bobber6467 / python-nose

Automatically exported from code.google.com/p/python-nose
0 stars 0 forks source link

Feature Request: support factoring out tests #440

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I have a couple of test fixture classes that differ only in their setUp and 
tearDown.   Naturally, I factored the test methods into a mixin.  However, if I 
give these method docstrings, they are indistinguishable in the nosetests -v 
output.  It would be better if nose would report the docstring for the class 
(or something) when beginning all its tests.

Original issue reported on code.google.com by dave@boostpro.com on 31 Jul 2011 at 1:30

GoogleCodeExporter commented 8 years ago
This is a problem with unittest itself and it's tricky to work around it in 
Nose (although we are still considering it).  In the meantime you can use this: 
https://github.com/kumar303/disable-docstring

Original comment by kumar.mcmillan on 31 Jul 2011 at 6:27

GoogleCodeExporter commented 8 years ago
How can it be a problem with unittest?  As far as I know, I'm not even using 
it.  Am I missing something?

Original comment by dave@boostpro.com on 31 Jul 2011 at 7:12

GoogleCodeExporter commented 8 years ago
Note also: I'm perfectly capable of leaving out the docstrings myself and using 
Python comments instead... but I really like the descriptive output I get from 
the docstrings.  I was just hoping to get some help from Nose in generating 
additional context for that output.

Original comment by dave@boostpro.com on 31 Jul 2011 at 7:14

GoogleCodeExporter commented 8 years ago
Nose is just an extension of unittest.  

If you want to customize the output you can do so in a plugin by implementing 
describeTest() as the plugin does that I linked to.

Original comment by kumar.mcmillan on 1 Aug 2011 at 1:21