nose-devs/nose — Issue #23: AttributeError: 'ContextSuite' has no attribute 'capturedOutput' in 0.10.3 
Author: jpellerin
Created: 2011-12-14 15:55:35+00:00
State: open

I came across the following issue with our custom output plugin for nose
when an Exception occurred when running setUp in a nose context suite:

Traceback (most recent call last):
File "/ws/garrcoop-sjc/tools/bin/nosetests", line 7, in ?
sys.exit(
File
"/thumper/sanity/pynt/usr/lib/python2.4/site-packages/nose-0.10.3.p1-py2.4.egg/nose/core.py",
line 219, in __init__
argv=argv, testRunner=testRunner, testLoader=testLoader)
File "/ws/garrcoop-sjc/tools///lib/python2.4/unittest.py", line 759, in
__init__
self.runTests()
File
"/thumper/sanity/pynt/usr/lib/python2.4/site-packages/nose-0.10.3.p1-py2.4.egg/nose/core.py",
line 298, in runTests
result = self.testRunner.run(self.test)
File
"/thumper/sanity/pynt/usr/lib/python2.4/site-packages/nose-0.10.3.p1-py2.4.egg/nose/core.py",
line 62, in run
test(result)
File
"/thumper/sanity/pynt/usr/lib/python2.4/site-packages/nose-0.10.3.p1-py2.4.egg/nose/suite.py",
line 132, in __call__
return self.run(*arg, **kw)
File
"/thumper/sanity/pynt/usr/lib/python2.4/site-packages/nose-0.10.3.p1-py2.4.egg/nose/suite.py",
line 162, in run
test(orig)
File
"/thumper/sanity/pynt/usr/lib/python2.4/site-packages/nose-0.10.3.p1-py2.4.egg/nose/suite.py",
line 132, in __call__
return self.run(*arg, **kw)
File
"/thumper/sanity/pynt/usr/lib/python2.4/site-packages/nose-0.10.3.p1-py2.4.egg/nose/suite.py",
line 162, in run
test(orig)
File
"/thumper/sanity/pynt/usr/lib/python2.4/site-packages/nose-0.10.3.p1-py2.4.egg/nose/suite.py",
line 132, in __call__
return self.run(*arg, **kw)
File
"/thumper/sanity/pynt/usr/lib/python2.4/site-packages/nose-0.10.3.p1-py2.4.egg/nose/suite.py",
line 162, in run
test(orig)
File
"/thumper/sanity/pynt/usr/lib/python2.4/site-packages/nose-0.10.3.p1-py2.4.egg/nose/suite.py",
line 132, in __call__
return self.run(*arg, **kw)
File
"/thumper/sanity/pynt/usr/lib/python2.4/site-packages/nose-0.10.3.p1-py2.4.egg/nose/suite.py",
line 152, in run
result.addError(self, self.exc_info())
File
"/thumper/sanity/pynt/usr/lib/python2.4/site-packages/nose-0.10.3.p1-py2.4.egg/nose/proxy.py",
line 120, in addError
plugins.addError(self.test, err)
File
"/thumper/sanity/pynt/usr/lib/python2.4/site-packages/nose-0.10.3.p1-py2.4.egg/nose/plugins/manager.py",
line 81, in __call__
return self.call(*arg, **kw)
File
"/thumper/sanity/pynt/usr/lib/python2.4/site-packages/nose-0.10.3.p1-py2.4.egg/nose/plugins/manager.py",
line 145, in simple
result = meth(*arg, **kw)
File
"/thumper/sanity/pynt/usr/lib/python2.4/site-packages/nose-0.10.3.p1-py2.4.egg/nose/plugins/manager.py",
line 303, in addError
capt = test.capturedOutput
AttributeError: 'ContextSuite' object has no attribute 'capturedOutput'

The attached patch fixed that issue, but it's odd why a ContextSuite is
being misinterpreted at this level...

Google Code Info:
Issue #: 296
Author: yaneg...@gmail.com
Created On: 2009-10-16T10:47:44.000Z
Closed On: