[Python-Dev] Purpose of Doctests [Was: Best practices for Enum]
tseaver at palladion.com
Sun May 19 22:17:26 CEST 2013
-----BEGIN PGP SIGNED MESSAGE-----
On 05/19/2013 12:14 PM, Dan Stromberg wrote:
> On Sat, May 18, 2013 at 11:41 PM, Raymond Hettinger <
> raymond.hettinger at gmail.com> wrote:
>> On May 14, 2013, at 9:39 AM, Gregory P. Smith <greg at krypto.org>
>> Bad: doctests.
>> I'm hoping that core developers don't get caught-up in the "doctests
>> are bad meme".
> Don't doctests intended for CPython not work on Jython, Pypy,
> I've been avoiding them for this reason.
"Naive" doctests depend a lot on repr, and hence tend to break even
between minor releases of CPython. Folks who use a lot of them apply a
great deal of elbow grease to working around that problem, e.g. through
"renoormalizing" the output:
Tres Seaver +1 540-429-0999 tseaver at palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/
-----END PGP SIGNATURE-----
More information about the Python-Dev