Message237849
| Author |
martin.panter |
| Recipients |
BreamoreBoy, eric.araujo, eric.snow, martin.panter, ncoghlan, robagar, schlamar |
| Date |
2015年03月11日.08:30:57 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1426062658.25.0.831652576182.issue14285@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
The patches at Issue 19771 should remove the part of the message that incorrectly says ". . . is a package and cannot be directly executed". However that still leaves the problem of the suppressed traceback.
I am posting runpy-traceback.patch here which adds some tests to check if the traceback is suppressed. The offending test is marked @expectedFailure. It also points out where the exception is being incorrectly caught, but I haven’t thought of a nice way to fix the problem.
Other changes in the runpy-traceback.patch:
* Removed the exception message rewriting in _run_module_as_main(), because it seems to be redundant with the _get_main_module_details() function
* Fixed test_cmd_line_script.CmdLineTest.test_dash_m_error_code_is_one(), which was only checking the Python exit status, and not verifying that the specific failure was the one anticipated |
|