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 belopolsky
Recipients belopolsky, flox
Date 2009-11-23.04:19:00
SpamBayes Score 6.142714e-11
Marked as misclassified No
Message-id <1258949943.56.0.857230465737.issue7376@psf.upfronthosting.co.za>
In-reply-to
Content
Apparently this was introduced with r51625 :

r51625 | guido.van.rossum | 2006-08-26 16:37:44 -0400 (Sat, 26 Aug 2006) 
| 4 lines

Inspired by SF patch #860326, make the exception formatting by
traceback.py be closer to the built-in formatting.
A few unittests had to be fixed, too.

------------------------------------------------------------------------


When doctest is imported as __main__, traceback does not prepend 
UnexpectedException with doctest. prefix.  Attached patch fixes the 
issue by explicitly reimporting doctest in the 'if __name__ == 
"__main__":' clause.

This is rather inelegant and a better solution would probably be to use 
python -m doctest for something other than self test.  For example, 
running doctest.testfile on command line arguments would be a reasonable  
use, but python -m doctest Lib/doctest.py may still have a problem.
History
Date User Action Args
2009-11-23 04:19:03belopolskysetrecipients: + belopolsky, flox
2009-11-23 04:19:03belopolskysetmessageid: <1258949943.56.0.857230465737.issue7376@psf.upfronthosting.co.za>
2009-11-23 04:19:02belopolskylinkissue7376 messages
2009-11-23 04:19:01belopolskycreate