disable forked testing when collecting test results as XML, doesn't currently work...
authorStefan Behnel <scoder@users.berlios.de>
Sat, 13 Mar 2010 07:18:11 +0000 (08:18 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Sat, 13 Mar 2010 07:18:11 +0000 (08:18 +0100)
Cython/Tests/xmlrunner.py
runtests.py

index e72b139fb90ad18cd7b26d99ac14bfe5a382470d..cd9e37f70384075ffb35759984cdd02cf03363aa 100644 (file)
@@ -155,15 +155,11 @@ class _XMLTestResult(_TextTestResult):
         "Write some information about the FAIL or ERROR to the stream."
         for test_info in errors:
             self.stream.writeln(self.separator1)
-            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)
+            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())
 
     def _get_info_by_testcase(self):
         """This method organizes test results by TestCase module. This
index 226bf9dd931956b51c22d0a1906ea73a9effb829..6000de530b53c8337b3351f8e567439828eb67ad 100644 (file)
@@ -882,6 +882,11 @@ if __name__ == '__main__':
     if options.doctests:
         collect_doctests(UNITTEST_ROOT, UNITTEST_MODULE + ".", test_suite, selectors)
 
+    if options.xml_output_dir:
+        # doesn't currently work together
+        print("Disabling forked testing to support XML test output")
+        options.fork = False
+
     if options.filetests and languages:
         filetests = TestBuilder(ROOTDIR, WORKDIR, selectors, exclude_selectors,
                                 options.annotate_source, options.cleanup_workdir,