
March 12, 2009
7:21 p.m.
On Wed, Mar 11, 2009 at 11:47 PM, Stefan Behnel <stefan_ml@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/)