Previously self._stdout was only set prior to the running of the test itself but not the setup method. Any errors in setup would throw an AttributeError when the test runner called PipedTestResult.addError.
This PR adds _setupStdout and _restoreStdout methods which are called in TestResult.startTest and TestResult.stopTest
Previously
self._stdout
was only set prior to the running of the test itself but not the setup method. Any errors in setup would throw anAttributeError
when the test runner called PipedTestResult.addError.This PR adds _setupStdout and _restoreStdout methods which are called in
TestResult.startTest
andTestResult.stopTest
Fixes #7.