[TIP] nose_fixes 1.1 released!

Ben Finney ben+python at benfinney.id.au
Thu Nov 24 17:17:35 PST 2011

Robert Collins <robertc at robertcollins.net> writes:

> On Thu, Nov 24, 2011 at 1:18 AM, Ben Finney <ben+python at benfinney.id.au> wrote:

> > Er, why is that considered silly? When I write a docstring for a
> > test, it is in the expectation that test reports will use the
> > synopsis (the first line of the PEP 257 compliant docstring) as the
> > test description.
> IIRC there was a thread here that dug into the reason not all that
> long ago.

URL please?

> Twisted trial, testtools, zope.testrunner - all these runners show
> just the id by default.

Yes. That's what I'm saying: they should show the synopsis line *also*,
since that's a significant part of the value of writing it.

> In general the goal of a test failure is to let you identify the
> failing code so that you can:
>  - reproduce the failure
>  - examine the code that caused the failure
>  - including any parameterisation

Those are all valuable. I'm saying there is *also* value in seeing what
the test is about in plain language; and a huge fully-qualified test
function name isn't the best way to show that.

> Many folk that I know find this easier to do using the test id()
> rather than description().

So, I'd avocate reporting both if they exist.

 \        “It is undesirable to believe a proposition when there is no |
  `\   ground whatever for supposing it true.” —Bertrand Russell, _The |
_o__)                                       Value of Scepticism_, 1928 |
Ben Finney

More information about the testing-in-python mailing list