From: Stefan Behnel Date: Thu, 11 Mar 2010 09:07:21 +0000 (+0100) Subject: Py2.3 test work-around X-Git-Tag: 0.13.beta0~319^2~2^2~11 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c12f67222feb9168c32aaf643b4d372502fdcb93;p=cython.git Py2.3 test work-around --- diff --git a/Cython/Tests/xmlrunner.py b/Cython/Tests/xmlrunner.py index 3b6e6ddf..a2054fc1 100644 --- a/Cython/Tests/xmlrunner.py +++ b/Cython/Tests/xmlrunner.py @@ -208,7 +208,9 @@ class _XMLTestResult(_TextTestResult): xml_testsuite.appendChild(testcase) testcase.setAttribute('classname', str(suite_name)) - testcase.setAttribute('name', str(test_result.test_method.shortDescription() or test_result.test_method._testMethodName)) + testcase.setAttribute('name', test_result.test_method.shortDescription() + or getattr(test_result.test_method, '_testMethodName', + str(test_result.test_method))) testcase.setAttribute('time', '%.3f' % test_result.get_elapsed_time()) if (test_result.outcome != _TestInfo.SUCCESS):