I have framework on python with pyunit, facing below issue while executing test case

Ned Batchelder ned at nedbatchelder.com
Mon Nov 27 08:25:52 EST 2017


On 11/27/17 8:13 AM, jaya.birdar at gmail.com wrote:
> Please let me know anyone aware about the issue
>
>
> Traceback (most recent call last):
> File "testrunner.py", line 447, in <module>
> testrunner_obj.main()
> File "testrunner.py", line 433, in main
> self.result()
> File "testrunner.py", line 310, in result
> result = runner.run(self.suite)
> File "/auto/PyUnit/PyUnit-0.3/utils/framework/HTMLTestRunner.py", line 720, in run
> test(result)
> File "/usr/lib/python2.7/unittest/suite.py", line 70, in __call__
> return self.run(*args, **kwds)
> File "/usr/lib/python2.7/unittest/suite.py", line 108, in run
> test(result)
> File "/usr/lib/python2.7/unittest/suite.py", line 70, in __call__
> return self.run(*args, **kwds)
> File "/usr/lib/python2.7/unittest/suite.py", line 108, in run
> test(result)
> File "/usr/lib/python2.7/unittest/suite.py", line 70, in __call__
> return self.run(*args, **kwds)
> File "/usr/lib/python2.7/unittest/suite.py", line 100, in run
> self._handleClassSetUp(test, result)
> File "/usr/lib/python2.7/unittest/suite.py", line 153, in _handleClassSetUp
> self._addClassOrModuleLevelException(result, e, errorName)
> File "/usr/lib/python2.7/unittest/suite.py", line 198, in _addClassOrModuleLevelException
> result.addError(error, sys.exc_info())
> File “/auto/PyUnit/PyUnit-0.3/utils/framework/HTMLTestRunner.py", line 633, in addError
> output = self.complete_output()
> File “/autoPyUnit/PyUnit-0.3/utils/framework/HTMLTestRunner.py", line 591, in complete_output
> return self.outputBuffer.getvalue()
> AttributeError: '_TestResult' object has no attribute 'outputBuffer'

It's hard to say without seeing all your code, but I notice PyUnit 0.3 
in your traceback.  If that's the PyUnit I think it is, PyUnit 1.4.1 was 
released 16(!) years ago, and has been in the standard library as 
unittest since version 2.1.  Are you running ancient versions of your 
test infrastructure?

--Ned.



More information about the Python-list mailing list