nose-devs/nose — Issue #380: Fix for coverage's broken print functionality
Author: jpellerin
Created: 2011-12-14 16:09:34+00:00
State: open

What steps will reproduce the problem?
1.run autonose
2. on a test with a print statement
3. first time it will pass, after that it will fail w/ NoneType exception

What is the expected output? What do you see instead?
a working print when an assert fails

What version of the product are you using? On what operating system?
nose 0.11.4

Please provide any additional information below.
# Running tests at 00:07:09

F.
======================================================================
FAIL: test_example (test.MyTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/along/Desktop/nosetest/test.py", line 6, in test_example
assert False
AssertionError:
-------------------- >> begin captured stdout << ---------------------
Hi

--------------------- >> end captured stdout << ----------------------

----------------------------------------------------------------------
Ran 2 tests in 0.005s

FAILED (failures=1)

should be seen but the a stock install will produce the error found here:
http://github.com/gfxmonk/autonose/issues#issue/13

commenting out line 70 of capture.py will fix this.

def formatError(self, test, err):
"""Add captured output to error report.
"""
test.capturedOutput = output = self.buffer
#self._buf = None

self._buf = None

is the problematic code.

Google Code Info:
Issue #: 353
Author: antl...@gmail.com
Created On: 2010-07-21T04:52:56.000Z
Closed On: