Commit 678b3615 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Add percent status in unit tests report.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@1277 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 692b271f
...@@ -172,12 +172,14 @@ class NeoTestRunner(unittest.TestResult): ...@@ -172,12 +172,14 @@ class NeoTestRunner(unittest.TestResult):
def _buildSystemInfo(self): def _buildSystemInfo(self):
import platform import platform
import datetime import datetime
success = self.testsRun - len(self.errors) - len(self.failures)
s = """ s = """
Date : %s Date : %s
Node : %s Node : %s
Processor : %s (%s) Processor : %s (%s)
System : %s (%s) System : %s (%s)
Directory : %s Directory : %s
Status : %7.3f%%
""" % ( """ % (
datetime.date.today().isoformat(), datetime.date.today().isoformat(),
platform.node(), platform.node(),
...@@ -186,6 +188,7 @@ class NeoTestRunner(unittest.TestResult): ...@@ -186,6 +188,7 @@ class NeoTestRunner(unittest.TestResult):
platform.system(), platform.system(),
platform.release(), platform.release(),
self.temp_directory, self.temp_directory,
success * 100.0 / self.testsRun,
) )
return s return s
......
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