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 petere
Recipients ezio.melotti, petere, r.david.murray
Date 2011-10-26.17:22:16
SpamBayes Score 3.1576475e-09
Marked as misclassified No
Message-id <1319649737.62.0.241645321953.issue13236@psf.upfronthosting.co.za>
In-reply-to
Content
Attached is a test file.  The key here is that I'm running the unittest suite inside of a long-running server process, so there is no predictable point of exit and cleanup.  Therefore, the steps I show at the end of the file should be run in an interactive interpreter.  Here is what I see:

>>> import unittest                                                                                                                             
>>> import testcase                                                                                                                             
>>> unittest.main(module=testcase)
.F.
======================================================================
FAIL: test_three (testcase.test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "testcase.py", line 35, in test_three
    self.fail("intentional failure")
AssertionError: intentional failure

----------------------------------------------------------------------
Ran 3 tests in 0.002s

FAILED (failures=1)

That's good.

But:

>>> import unittest                                                                                                                             
>>> import testcase                                                                                                                             
>>> unittest.main(module=testcase, testRunner=testcase.FunnyTestRunner, exit=False)                                                             
.
F
.
<unittest.main.TestProgram object at 0xf718fd4c>

You see, the test report at the end is missing.

I'm happy to consider other ways of addressing this, if anyone has an idea.
History
Date User Action Args
2011-10-26 17:22:17peteresetrecipients: + petere, ezio.melotti, r.david.murray
2011-10-26 17:22:17peteresetmessageid: <1319649737.62.0.241645321953.issue13236@psf.upfronthosting.co.za>
2011-10-26 17:22:17peterelinkissue13236 messages
2011-10-26 17:22:16peterecreate