-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
[Windows] test_os fails several C-level assertions #68107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Uninteresting bits of the output elided: C:\Data\code\CPython\hg.python.org\default>python -m test -vn test_os ---------------------------------------------------------------------- OK (skipped=75) |
The fix for these is to hide the output, which is in the test modules handling of the -n option. The assertions should fail, as they are testing error conditions. |
Here's the problem with that: C:\Data\code\CPython\hg.python.org\default>python -m test.test_os |
I mean we just suppress the output completely. Currently it sets the mode to stderr but we can set it to silent, though I don't recall what the name of the constant we need is. |
Since Python raises an exception for EBADF, I don't see the purpose of these assertion messages. |
So just discussed with Zach the idea of hiding all assertion outputs by default and then using -n to display the output on stderr. That would help people get started running tests locally as well, since the dialogs that appear by default look like pretty bad failures. One of us will get a patch together and probably review it in person, since it's a fairly simple change, but if anyone not at PyCon has a strong opinion it'd be good to hear it. |
This patch:
|
I would prefer to disable the popups and messages to stderr by default in Python directly. If some users want to see them, we can add a -X option to enable them. Example: -X enable_mscrt_checks. What do you think? Do you recall who complain that Python hides MSCRT warnings? And why he/she complained? I don't want these warnings, especially popups blocking my program, on my own applications. Python already raises OSError on errors. The problem in tests is also that some tests use subprocesses and regrtest only configures the test runner, not subprocesses. For example, I had to modify a subprocess started by the test. Otherwise, the test *hangs* :-( Popups are annoying because it's not possible to ignore them all by a single click. I have to click N times for N errors, with N>100 it's just a nightmare... For me, it's a regression compared to older Python versions. I don't remember to have to click on so much popups or have stderr flooded by warnings when working on Windows, when I worked on Python 3.4 or older. |
23919_1.patch looks good to me. |
I referred to the issues that had -n added in the first place many times while adding the IPH handlers, but I don't have them handy now on my phone. The rationale was that people who cause assertions in their C extensions should see them and not have Python suppress them. All cases where an assert is raised in a debug build is a coding error - the test suite deliberately causes some but this is not normal development and should not dictate normal configuration. |
New changeset 69c4fa62b608 by Steve Dower in branch '3.5': New changeset 62897db9ae51 by Steve Dower in branch 'default': |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: