nose-devs/nose — Issue #355: with_setup decorator (@with_setup) not working
Author: jpellerin
Created: 2011-12-14 16:08:58+00:00
State: open

What steps will reproduce the problem?
1. decorate a test with @with_setup
2. run the test

What is the expected output? What do you see instead?
The expected is the result of the test execution.

Instead I get:

Traceback (most recent call last):
File "bin/tests", line 38, in
nose.main(argv=['nose', '--with-xunit', '--attr=!realdata']+sys.argv[1:])
File "/home/filipa/Work/core2/eggs/nose-0.11.1-py2.6.egg/nose/core.py",
line 113, in __init__
argv=argv, testRunner=testRunner, testLoader=testLoader)
File "/usr/lib/python2.6/unittest.py", line 817, in __init__
self.runTests()
File "/home/filipa/Work/core2/eggs/nose-0.11.1-py2.6.egg/nose/core.py",
line 192, in runTests
result = self.testRunner.run(self.test)
File "/home/filipa/Work/core2/eggs/nose-0.11.1-py2.6.egg/nose/core.py",
line 61, in run
test(result)
File "/home/filipa/Work/core2/eggs/nose-0.11.1-py2.6.egg/nose/suite.py",
line 154, in __call__
return self.run(*arg, **kw)
File "/home/filipa/Work/core2/eggs/nose-0.11.1-py2.6.egg/nose/suite.py",
line 197, in run
test(orig)
File "/home/filipa/Work/core2/eggs/nose-0.11.1-py2.6.egg/nose/suite.py",
line 154, in __call__
return self.run(*arg, **kw)
File "/home/filipa/Work/core2/eggs/nose-0.11.1-py2.6.egg/nose/suite.py",
line 197, in run
test(orig)
File "/home/filipa/Work/core2/eggs/nose-0.11.1-py2.6.egg/nose/suite.py",
line 154, in __call__
return self.run(*arg, **kw)
File "/home/filipa/Work/core2/eggs/nose-0.11.1-py2.6.egg/nose/suite.py",
line 197, in run
test(orig)
File "/home/filipa/Work/core2/eggs/nose-0.11.1-py2.6.egg/nose/suite.py",
line 154, in __call__
return self.run(*arg, **kw)
File "/home/filipa/Work/core2/eggs/nose-0.11.1-py2.6.egg/nose/suite.py",
line 187, in run
result.addError(self, self._exc_info())
File "/home/filipa/Work/core2/eggs/nose-0.11.1-py2.6.egg/nose/proxy.py",
line 121, in addError
plugins.addError(self.test, err)
File
"/home/filipa/Work/core2/eggs/nose-0.11.1-py2.6.egg/nose/plugins/manager.py",
line 82, in __call__
return self.call(*arg, **kw)
File
"/home/filipa/Work/core2/eggs/nose-0.11.1-py2.6.egg/nose/plugins/manager.py",
line 150, in simple
result = meth(*arg, **kw)
File
"/home/filipa/Work/core2/eggs/nose-0.11.1-py2.6.egg/nose/plugins/xunit.py",
line 165, in addError
id = test.id()
AttributeError: 'ContextSuite' object has no attribute 'id'

What version of the product are you using? On what operating system?
0.11.1 on ubuntu 9.10 (karmic)

I read some similar issue but I am not sure if it was already fixed before
for other os.

Thank you.

Google Code Info:
Issue #: 304
Author: filipa.a...@gmail.com
Created On: 2009-11-05T13:03:27.000Z
Closed On: 2009-11-05T15:01:14.000Z