[pypy-svn] rev 2494 - pypy/trunk/src/pypy/tool
sschwarzer at codespeak.net
sschwarzer at codespeak.net
Thu Dec 18 14:22:40 CET 2003
Author: sschwarzer
Date: Thu Dec 18 14:22:39 2003
New Revision: 2494
Modified:
pypy/trunk/src/pypy/tool/newtest.py
Log:
TestSuite.testresults: Store last result in self.lastresult .
Modified: pypy/trunk/src/pypy/tool/newtest.py
==============================================================================
--- pypy/trunk/src/pypy/tool/newtest.py (original)
+++ pypy/trunk/src/pypy/tool/newtest.py Thu Dec 18 14:22:39 2003
@@ -144,6 +144,7 @@
"""Represent a collection of test items."""
def __init__(self):
self.items = []
+ self.lastresult = []
def _module_from_modpath(self, modpath):
"""
@@ -207,8 +208,11 @@
def testresults(self):
"""Return a generator to get the test result for each test item."""
+ self.lastresults = []
for item in self.items:
- yield item.run()
+ result = item.run()
+ self.lastresults.append(result)
+ yield result
def main():
@@ -217,7 +221,7 @@
for res in ts.testresults():
if res.status == SUCCESS:
continue
- print 75 * '-'
+ print 79 * '-'
print "%s: %s" % (res.item, res.status)
if res.traceback:
print
More information about the Pypy-commit
mailing list