From 255f319bd93e788fb13eb53c41cc7c40a4ffd358 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sat, 13 Mar 2010 07:36:35 +0100 Subject: [PATCH] trial test fix for Py2.7 --- Cython/Tests/xmlrunner.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) 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 -- 2.26.2