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.

Title: Failed module loading in test discovery loses traceback
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 2.7
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: michael.foord Nosy List: eric.araujo, michael.foord
Priority: normal Keywords:

Created on 2010-12-04 00:14 by michael.foord, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg123308 - (view) Author: Michael Foord (michael.foord) * (Python committer) Date: 2010-12-04 00:14
If a test module fails to load during unittest test discovery (SyntaxError or other exception) then the error is reported during the test run.

Due to the way the exception is re-raised the traceback is lost.

Originally reported as unittest2 issue 29:
msg125204 - (view) Author: Michael Foord (michael.foord) * (Python committer) Date: 2011-01-03 17:47
This doesn't appear to be true on py3k (traceback.format_exc is used to preserve the original traceback). Need to check on Python 2.7.
msg125206 - (view) Author: Michael Foord (michael.foord) * (Python committer) Date: 2011-01-03 17:56
Same is true of Python 2.7 - looks like an invalid error report.
Date User Action Args
2022-04-11 14:57:09adminsetgithub: 54828
2011-01-03 17:56:38michael.foordsetstatus: open -> closed

messages: + msg125206
resolution: not a bug
stage: needs patch -> resolved
2011-01-03 17:47:43michael.foordsetmessages: + msg125204
versions: - Python 3.2
2010-12-04 00:32:11eric.araujosetnosy: + eric.araujo
2010-12-04 00:14:23michael.foordcreate