[TIP] Using one unit test with different input parameters

Jonathan Lange jml at mumak.net
Tue Jul 22 21:04:09 PDT 2008


On Wed, Jul 23, 2008 at 1:50 PM, Ben Finney <ben+python at benfinney.id.au> wrote:
> "Jonathan Lange" <jml at mumak.net> writes:>
>> It will return the docstring of a test if it has one. Seeing the
>> docstring in a test run might *sound* like a good idea, but in the
>> heat of debugging it's just frustrating.
>
> My experience is quite contrary to this. If one writes docstrings as
> one-line synopsis plus multi-line description (as per PEP 257) then
> the one-line synopsis is used as the test description. I find this
> very useful in practice.

The source of my frustration is the inability to quickly locate a
failing test. Docstrings are fine when things are passing, but can be
a pain when isolating five failing tests out of ten thousand.

jml



More information about the testing-in-python mailing list