[pypy-svn] r16769 - pypy/release/0.7.x/pypy/tool/pytest
hpk at codespeak.net
hpk at codespeak.net
Sat Aug 27 16:32:29 CEST 2005
Author: hpk
Date: Sat Aug 27 16:32:29 2005
New Revision: 16769
Modified:
pypy/release/0.7.x/pypy/tool/pytest/htmlreport.py
pypy/release/0.7.x/pypy/tool/pytest/result.py
Log:
show more detailed compliancy test information
with the new result-parsing help from ale.
Modified: pypy/release/0.7.x/pypy/tool/pytest/htmlreport.py
==============================================================================
--- pypy/release/0.7.x/pypy/tool/pytest/htmlreport.py (original)
+++ pypy/release/0.7.x/pypy/tool/pytest/htmlreport.py Sat Aug 27 16:32:29 2005
@@ -29,7 +29,7 @@
def render_latest_table(self, results):
table = html.table(
[html.th(x, align='left')
- for x in ("status", "filename", "revision",
+ for x in ("failure", "filename", "revision",
"user", "platform", "elapsed",
"options", "last error line"
)],
@@ -54,8 +54,9 @@
if not options:
options=" "
+ failureratio = 1.0 - result.ratio_of_passed()
return html.tr(
- html.td(result['outcome'],
+ html.td("%.2f%%" % failureratio,
style = "background-color: %s" % (getresultcolor(result),)),
html.td(self.render_test_references(result)),
html.td(result['pypy-revision']),
@@ -119,11 +120,17 @@
ok = len([x for x in tests if x.isok()])
err = len([x for x in tests if x.iserror()])
to = len([x for x in tests if x.istimeout()])
- sum = ok + err + to
- sum100 = sum / 100.0
+ numtests = ok + err + to
+
t = html.table()
+ sum100 = numtests / 100.0
def row(*args):
return html.tr(*[html.td(arg) for arg in args])
+
+ sum_passed = sum([x.ratio_of_passed() for x in tests])
+ t.append(row(html.b("core tests compliancy"),
+ html.b("%.2f%%" % (sum_passed/sum100,))))
+
t.append(row("testmodules passed completely", "%.2f%%" % (ok/sum100)))
t.append(row("testmodules (partially) failed", "%.2f%%" % (err/sum100)))
t.append(row("testmodules timeout", "%.2f%%" % (to/sum100)))
Modified: pypy/release/0.7.x/pypy/tool/pytest/result.py
==============================================================================
--- pypy/release/0.7.x/pypy/tool/pytest/result.py (original)
+++ pypy/release/0.7.x/pypy/tool/pytest/result.py Sat Aug 27 16:32:29 2005
@@ -91,10 +91,10 @@
return passed/run
else:
run = self.grep_nr('TestFailed: \d+ of ',section='stderr')
- if run >0 :
+ if run > 0 :
return (run-passed)/run
else:
- return 0
+ return 0.0
def isok(self):
return self['outcome'].lower() == 'ok'
More information about the Pypy-commit
mailing list