[TIP] [Zope-dev] zope.testrunner and nose count doctests differently

Mark Sienkiewicz sienkiew at stsci.edu
Mon Nov 7 11:51:09 PST 2011

On 11/07/11 12:53, Chris Withers wrote:
> The only hiccup is that nose doesn't respect a test_suite function by default, so I wrote a plugin to make it do the right thing:

> Nose people: any idea *why* nose doesn't respect this method?

I'm not directly involved in nose development, but since I have seen you ask this question a few times and not seen an answer, I'll give you my observation:

The point of nose is to run tests without the complex interface required by the original unittest.  In this case, it means you never need to write a test_suite -- you write your tests with recognizable names and the list of tests is constructed automatically.

It seems to me that the most likely answer to your question is "didn't think of it".  When using nose, I would never think of providing a test_suite -- a big advantage of nose is that you don't have to.  So, if I were writing nose (I didn't) or a similar tool (I did), I would not think of looking for a test_suite.  The automatic discovery is just too convenient.

I think you can make a good argument that nose should use the test_suite if it is explicitly specified:  "Do exactly what the programmer said" is usually a good thing, and programmers who don't want to deal with the drawbacks of an explicit test_suite should just "don't write one".

Mark S.

More information about the testing-in-python mailing list