[TIP] Nose bug? doctestcase constructor

Fernando Perez fperez.net at gmail.com
Thu Jul 17 01:35:10 PDT 2008


is this a known nose bug?  This code:

class DocTestCase(doctest.DocTestCase):
 # snip docstring

    def __init__(self, test, optionflags=0, setUp=None, tearDown=None,
                 checker=None, obj=None):
        self._nose_obj = obj
        super(DocTestCase, self).__init__(
            test, optionflags=optionflags, setUp=None, tearDown=None,

has hardcoded the values it passes to the parent constructor, which
means that no matter what inputs go into its own constructor, they get
destroyed.  Was this deliberate, and if so  what's the reason for it?
Or is it a known/fixed bug in nose?



ps - the fact that nose swallows silently all exceptions during plugin
loading of tests (such as during calls to loadTestsFromModule) made
understanding the above problem extremely tricky.  Is there a reason
for this behavior of nose?  IMHO it would really be better to at least
show exceptions from user plugin code.  Right now, debugging loader
problems is a very hard because nose simply swallows the exceptions
and moves along not loading the tests.

More information about the testing-in-python mailing list