This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author theller
Recipients
Date 2003-04-16.17:49:36
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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
History
Date User Action Args
2007-08-23 15:22:15adminlinkissue722638 messages
2007-08-23 15:22:15admincreate