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

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

Open
ncarenton opened this issue Feb 7, 2014 · 1 comment
Open

Comments

@ncarenton
Copy link

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'

@ncarenton ncarenton reopened this Feb 11, 2014
@ncarenton
Copy link
Author

This attribute error actually occurs every time a method of a specific module is called from another module.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant