Commit 2514dddd authored by Denis Bilenko's avatar Denis Bilenko

add testcasename property to TestCase

parent 56d3f7b0
......@@ -36,6 +36,7 @@ def exit_unless_25():
if sys.version_info[:2] < (2, 5):
exit_disabled()
class TestCase(unittest.TestCase):
__timeout__ = 1
......@@ -81,6 +82,10 @@ class TestCase(unittest.TestCase):
def testname(self):
return getattr(self, '_testMethodName', '') or getattr(self, '_TestCase__testMethodName')
@property
def testcasename(self):
return self.__class__.__name__ + '.' + self.testname
def find_command(command):
for path in os.getenv('PATH', '/usr/bin:/usr/sbin').split(os.pathsep):
......
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