[Python-ideas] Adding a test discovery into Python

Guido van Rossum guido at python.org
Thu Mar 12 19:21:05 CET 2009

On Wed, Mar 11, 2009 at 11:47 PM, Stefan Behnel <stefan_ml at behnel.de> wrote:
> Raymond Hettinger wrote:
>> I'm strongly for offering tools that make it easier to write
>> the tests in the first place.   The syntax used by py.test
>> and nose is vastly superior to the one used by unittest.py,
>> a module that is more Javathonic than Pythonic.
>> [...]
>> Factoid of the Day:  In Py2.7's test_datetime module,
>> the phrase self.assertEqual occurs 578 times.
> Doesn't that just scream for using a doctest instead?
> The interpreter driven type-think-copy-paste pattern works pretty well for
> these things.

That depends on how well all the other tests (those that *don't* use
assertEquals) fit in doctest's mold.

--Guido van Rossum (home page: http://www.python.org/~guido/)

More information about the Python-ideas mailing list