This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients michael.foord, r.david.murray
Date 2012-06-06.01:15:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1338945336.0.0.232822972471.issue15007@psf.upfronthosting.co.za>
In-reply-to
Content
Right, I'm not wanting to run discovery from the command line, I'm wanting to run the tests in the package by package name.  In my mind, this is exactly parallel to specifying a module name and having unittest automatically discover the TestCase classes in it.  We don't have unittest run 0 tests because discovery wasn't invoked when the module name was specified.  Why should it be different for a test package?  If boilerplate is required in __init__.py to make that happen that's OK, though to my mind not ideal.

Is there some different magic I can put into __init__.py that will result in the tests in the package being run such that the package name shows up in the report?  Without that, specifying a package name on the unittest command line seems pretty useless.  (I mean, to get it to do anything useful, you'd have to be putting all the TestCases in the __init__.py, and if you are doing that, why have a package?)

The issue about improving the name output was about making it copy and pasteable (something I would also very much like).  The naming issue here is different, about how to get the package name to show up in the fully qualified test name.

I will open another bug for the _top_level_dir issue.
History
Date User Action Args
2012-06-06 01:15:36r.david.murraysetrecipients: + r.david.murray, michael.foord
2012-06-06 01:15:36r.david.murraysetmessageid: <1338945336.0.0.232822972471.issue15007@psf.upfronthosting.co.za>
2012-06-06 01:15:35r.david.murraylinkissue15007 messages
2012-06-06 01:15:33r.david.murraycreate