Commit 3586466d authored by Ralf Schmitt's avatar Ralf Schmitt

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

parent b2dac472
...@@ -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)
try:
return test_method.__func__.func_code.co_filename 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