From: Stefan Behnel Date: Sat, 13 Mar 2010 06:36:35 +0000 (+0100) Subject: trial test fix for Py2.7 X-Git-Tag: 0.13.beta0~314 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=255f319bd93e788fb13eb53c41cc7c40a4ffd358;p=cython.git trial test fix for Py2.7 --- diff --git a/Cython/Tests/xmlrunner.py b/Cython/Tests/xmlrunner.py index 5519fc73..e72b139f 100644 --- a/Cython/Tests/xmlrunner.py +++ b/Cython/Tests/xmlrunner.py @@ -155,12 +155,16 @@ class _XMLTestResult(_TextTestResult): "Write some information about the FAIL or ERROR to the stream." for test_info in errors: self.stream.writeln(self.separator1) - self.stream.writeln('%s [%.3fs]: %s' % \ - (flavour, test_info.get_elapsed_time(), \ - test_info.get_description())) - self.stream.writeln(self.separator2) - self.stream.writeln('%s' % test_info.get_error_info()) - + if isinstance(test_info, _TestInfo): + self.stream.writeln('%s [%.3fs]: %s' % \ + (flavour, test_info.get_elapsed_time(), \ + test_info.get_description())) + self.stream.writeln(self.separator2) + self.stream.writeln('%s' % test_info.get_error_info()) + else: + self.stream.writeln(str(test_info)) + self.stream.writeln(self.separator2) + def _get_info_by_testcase(self): """This method organizes test results by TestCase module. This information is used during the report generation, where a XML report