Skip to content
This repository was archived by the owner on May 29, 2018. It is now read-only.
This repository was archived by the owner on May 29, 2018. It is now read-only.

AttributeError: 'ContextSuite' object has no attribute 'test'  #1

@ncarenton

Description

@ncarenton

Hello and thanks for this nice plugin. I am having a problem when an exception occurs inside a function called from the setup_module() in a nose context. It is only happening when specifying "--wih-html". Without this arg, I get the right error message corresponding to the exception instead of the one below. Is there some way to avoid this?

Many thanks

$nosetests test_2.py --with-html
Traceback (most recent call last):
File "/usr/local/bin/nosetests", line 9, in
load_entry_point('nose==1.3.0', 'console_scripts', 'nosetests')()
File "/usr/local/lib/python2.7/dist-packages/nose-1.3.0-py2.7.egg/nose/core.py", line 118, in init
*_extra_args)
File "/usr/lib/python2.7/unittest/main.py", line 95, in init
self.runTests()
File "/usr/local/lib/python2.7/dist-packages/nose-1.3.0-py2.7.egg/nose/core.py", line 197, in runTests
result = self.testRunner.run(self.test)
File "/usr/local/lib/python2.7/dist-packages/nose-1.3.0-py2.7.egg/nose/core.py", line 61, in run
test(result)
File "/usr/local/lib/python2.7/dist-packages/nose-1.3.0-py2.7.egg/nose/suite.py", line 176, in call
return self.run(_arg, *_kw)
File "/usr/local/lib/python2.7/dist-packages/nose-1.3.0-py2.7.egg/nose/suite.py", line 213, in run
result.addError(self, self._exc_info())
File "/usr/local/lib/python2.7/dist-packages/nose-1.3.0-py2.7.egg/nose/proxy.py", line 131, in addError
plugins.addError(self.test, err)
File "/usr/local/lib/python2.7/dist-packages/nose-1.3.0-py2.7.egg/nose/plugins/manager.py", line 99, in call
return self.call(_arg, *_kw)
File "/usr/local/lib/python2.7/dist-packages/nose-1.3.0-py2.7.egg/nose/plugins/manager.py", line 167, in simple
result = meth(_arg, **kw)
File "/usr/local/lib/python2.7/dist-packages/nose-1.3.0-py2.7.egg/nose/plugins/manager.py", line 334, in addError
return self.plugin.addError(test.test, err, capt)
AttributeError: 'ContextSuite' object has no attribute 'test'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions