[pypy-svn] rev 2493 - pypy/trunk/src/pypy/tool
sschwarzer at codespeak.net
sschwarzer at codespeak.net
Thu Dec 18 14:15:25 CET 2003
Author: sschwarzer
Date: Thu Dec 18 14:15:24 2003
New Revision: 2493
Modified:
pypy/trunk/src/pypy/tool/newtest.py
Log:
TestItem.run: If the test method causes an error or a failure, don't
overwrite the result object if the readDown method also fails.
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:15:24 2003
@@ -123,7 +123,10 @@
except KeyboardInterrupt:
raise
except:
- result._setstatus(ERROR)
+ # if we already had an exception in the test method,
+ # don't overwrite it
+ if result.status not in (ERROR, FAILURE):
+ result._setstatus(ERROR)
finally:
if posttest is not None:
posttest(self)
More information about the Pypy-commit
mailing list