Commit 31a68f81 authored by Ralf Schmitt's avatar Ralf Schmitt

greentest.py: fix AttributeError in modulename function when using python 2.4/2.5.

--HG--
extra : transplant_source : Qb%8D%5EC%C6%F2%8D%02Pb%BAh%C6%03%1E%7E%A9%19%97
parent dae9f3ba
...@@ -95,7 +95,10 @@ class TestCase(BaseTestCase): ...@@ -95,7 +95,10 @@ class TestCase(BaseTestCase):
@property @property
def modulename(self): def modulename(self):
test_method = getattr(self, self.testname) test_method = getattr(self, self.testname)
return test_method.__func__.func_code.co_filename try:
return test_method.__func__.func_code.co_filename
except AttributeError:
return test_method.im_func.func_code.co_filename
@property @property
def fullname(self): def fullname(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment