Commit 8fd16123 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Display inline test results in test runner.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1776 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent d68cfb1c
......@@ -142,7 +142,9 @@ class NeoTestRunner(unittest.TestResult):
stats.time += time.time() - self.lastStart
def startTest(self, test):
print ' *', test.__class__.__module__, test._TestCase__testMethodName
print ' * %s %s...' % (test.__class__.__module__,
test._TestCase__testMethodName),
sys.stdout.flush()
unittest.TestResult.startTest(self, test)
module = test.__class__.__name__
method = test._TestCase__testMethodName
......@@ -152,18 +154,21 @@ class NeoTestRunner(unittest.TestResult):
self.lastStart = time.time()
def addSuccess(self, test):
print "OK"
unittest.TestResult.addSuccess(self, test)
stats = self._getModuleStats(test)
stats.success += 1
self._updateTimer(stats)
def addError(self, test, err):
print "ERROR"
unittest.TestResult.addError(self, test, err)
stats = self._getModuleStats(test)
stats.errors += 1
self._updateTimer(stats)
def addFailure(self, test, err):
print "FAIL"
unittest.TestResult.addFailure(self, test, err)
stats = self._getModuleStats(test)
stats.failures += 1
......
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