[issue10979] setUpClass exception causes explosion with "-b"
report at bugs.python.org
Thu Mar 17 05:38:05 CET 2011
Michael Foord <michael at voidspace.org.uk> added the comment:
Thanks for finding this Brandon. The same problem probably exists for setupmodule and the teardown variants too.
The issue is that the sys.stdout manipulation is done by result.startTest but setUpClass and setUpModule are executed by the suite outside the normal startTest / stopTest cycle.
I think the answer is to have the stdout manipulation done in separate result methods (called by stopTest / startTest) that can also be called by the suite around the setup / teardown of class and module.
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list