Message43364
This patch enables more useful output for unittests: If
a test crashes (raises an unexpected exception), a full
traceback is printed.
If a test failes, the output is something like this:
========================================
FAIL: test_failUnlessEqual (__main__.FailingTests)
----------------------------------------------------------------------
TestFailed: 0 != 1
File "xunit.py", line 12, in test_failUnlessEqual
self.failUnlessEqual(self.a, self.b)
========================================
Before, this was printed:
========================================
FAIL: test_failIfEqual (__main__.FailingTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "xunit.py", line 15, in test_failIfEqual
self.failIfEqual(self.a, self.a)
File "c:\python23\lib\unittest.py", line 300, in
failIfEqual
raise self.failureException, \
AssertionError: 0 == 0
========================================
If needed, I can upload the test script I use, together
with the results before and after the patch.
This has shortly been discussed on c.l.p, response was
mostly positive.
http://tinyurl.com/9obf |
|
Date |
User |
Action |
Args |
2007-08-23 15:22:15 | admin | link | issue722638 messages |
2007-08-23 15:22:15 | admin | create | |
|