Issue 14729: test_faulthandler test is too specific to work on Windows (original) (raw)

Created on 2012-05-05 10:44 by vinay.sajip, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_faulthandler.diff vinay.sajip,2012-05-05 10:44 Proposed small change to test regex
Messages (5)
msg159986 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2012-05-05 10:44
In test_faulthandler.test_check_fatal_error, the test expects a response which matches """ ^Fatal Python error: {name} {header}: File "", line {lineno} in $ """.strip() On Windows, some more information is appended to the end of the message, so the match fails because of the trailing .Iproposetoremovethis. I propose to remove this .Iproposetoremovethis, so that the match succeeds just on the basis of the prefix. Patch attached; I'll apply it soon, assuming you don't object.
msg159992 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2012-05-05 13:48
> On Windows, some more information is appended to the end of the message (...) Which information? What do write these information?
msg159996 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2012-05-05 15:52
> Which information? What do write these information? The Windows error message has the same beginning, but an additional "This application has requested the Runtime to terminate it in an unusual way.\nPlease contact the application's support team for more information." I believe this is added by Microsoft libraries - it's doesn't come from Python AFAIK. See #9116 for a similar problem (look only at the initial report - most of the following comments go off at a tangent about preventing debugger popups).
msg160030 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2012-05-05 19:38
Vinay's patch solves the problem. +1 for committing.
msg160070 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-05-06 10:28
New changeset 2e71f25912d4 by Vinay Sajip in branch 'default': Closes #14729: Allowed test to pass on Windows by adjusting the test condition slightly to allow for a Windows-specific error message. http://hg.python.org/cpython/rev/2e71f25912d4
History
Date User Action Args
2022-04-11 14:57:29 admin set github: 58934
2012-05-06 10:28:53 python-dev set status: open -> closednosy: + python-devmessages: + resolution: fixedstage: resolved
2012-05-05 19:38:27 skrah set nosy: + skrahmessages: +
2012-05-05 15:52:05 vinay.sajip set messages: +
2012-05-05 13:48:39 vstinner set messages: +
2012-05-05 10:44:34 vinay.sajip create