Commit dd38109e authored by Grégory Wisniewski's avatar Grégory Wisniewski

Use path, test class and test method when displaying a failed test report to

allow copy/paste them and launch the test again.


git-svn-id: https://svn.erp5.org/repos/neo/trunk@1310 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 7f033f3c
......@@ -230,10 +230,15 @@ class NeoTestRunner(unittest.TestResult):
def _buildErrors(self):
s = '\n'
test_formatter = lambda t: '%s.py %s.%s' % (
t.__class__.__module__.replace('.', '/'),
t.__class__.__name__,
t._TestCase__testMethodName,
)
if len(self.errors):
s += '\nERRORS:\n'
for test, trace in self.errors:
s += "%s\n" % test
s += "%s\n" % test_formatter(test)
s += "-------------------------------------------------------------\n"
s += trace
s += "-------------------------------------------------------------\n"
......@@ -241,7 +246,7 @@ class NeoTestRunner(unittest.TestResult):
if len(self.failures):
s += '\nFAILURES:\n'
for test, trace in self.failures:
s += "%s\n" % test
s += "%s\n" % test_formatter(test)
s += "-------------------------------------------------------------\n"
s += trace
s += "-------------------------------------------------------------\n"
......
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