From c12f67222feb9168c32aaf643b4d372502fdcb93 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Thu, 11 Mar 2010 10:07:21 +0100 Subject: [PATCH] Py2.3 test work-around --- Cython/Tests/xmlrunner.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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): -- 2.26.2