Author: bugman Date: Fri Jan 4 18:22:42 2008 New Revision: 4332 URL: http://svn.gna.org/viewcvs/relax?rev=4332&view=rev Log: Completed the STDOUT capture and prepending by added an override for _TextTestResult.addError().
Modified: 1.3/test_suite/relax_test_runner.py Modified: 1.3/test_suite/relax_test_runner.py URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/relax_test_runner.py?rev=4332&r1=4331&r2=4332&view=diff ============================================================================== --- 1.3/test_suite/relax_test_runner.py (original) +++ 1.3/test_suite/relax_test_runner.py Fri Jan 4 18:22:42 2008 @@ -59,8 +59,20 @@ # Restore stdout. sys.stdout = sys.__stdout__ - # Close the buffer. - self.capt_stdout.close() + + def addError(self, test, err): + """Override of the TestResult.addError() method. + + The STDOUT captured text is prepended to the error text here. + """ + + # Execute the normal addError method. + _TextTestResult.addError(self, test, err) + + # Prepend STDOUT to the second element of the tuple. + self.errors[-1] = (self.errors[-1][0], self.capt_stdout.getvalue() + self.errors[-1][1]) + + class RelaxTestRunner(TextTestRunner): _______________________________________________ relax (http://nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits