safety fix
authorStefan Behnel <scoder@users.berlios.de>
Fri, 5 Mar 2010 14:47:39 +0000 (15:47 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Fri, 5 Mar 2010 14:47:39 +0000 (15:47 +0100)
Cython/Tests/xmlrunner.py

index f52fb6994f39a7486f4503a31907205512f6dac0..3dfedc13c78c6852a5e2ef8ec572cb4d800bb853 100644 (file)
@@ -208,7 +208,7 @@ class _XMLTestResult(_TextTestResult):
         xml_testsuite.appendChild(testcase)
         
         testcase.setAttribute('classname', suite_name)
-        testcase.setAttribute('name', test_result.test_method.shortDescription())
+        testcase.setAttribute('name', test_result.test_method.shortDescription() or test_result.test_method._testMethodName)
         testcase.setAttribute('time', '%.3f' % test_result.get_elapsed_time())
         
         if (test_result.outcome != _TestInfo.SUCCESS):