-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
gh-121008: Fix idlelib.run tests #121046
gh-121008: Fix idlelib.run tests #121046
Conversation
When testing IDLE, don't create a Tk to avoid side effects such as installing a PyOS_InputHook hook.
Without this change, With this change, the same command no longer hangs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes the issue for me on Ubuntu and macOS, both GUI builds. Tests pass with:
> /Volumes/RAMDisk/installed-main/bin/python3 -E -Wd -m test --slowest --fail-env-changed -uall test_idle test_pyrepl
Using random seed: 2738848300
Raised RLIMIT_NOFILE: 256 -> 1024
0:00:00 load avg: 9.16 Run 2 tests sequentially in a single process
0:00:00 load avg: 9.16 [1/2] test_idle
0:00:09 load avg: 9.14 [2/2] test_pyrepl
== Tests result: SUCCESS ==
10 slowest tests:
- test_idle: 9.3 sec
- test_pyrepl: 4.5 sec
All 2 tests OK.
Total duration: 13.9 sec
Total tests: run=740 skipped=5
Total test files: run=2/2
Result: SUCCESS
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
When testing IDLE, don't create a Tk to avoid side effects such as installing a PyOS_InputHook hook. (cherry picked from commit 44eafd6) Co-authored-by: Victor Stinner <[email protected]>
GH-121049 is a backport of this pull request to the 3.13 branch. |
Ok, let me merge this change and see how it goes. Thanks for the review @ambv. |
gh-121008: Fix idlelib.run tests (GH-121046) When testing IDLE, don't create a Tk to avoid side effects such as installing a PyOS_InputHook hook. (cherry picked from commit 44eafd6) Co-authored-by: Victor Stinner <[email protected]>
When testing IDLE, don't create a Tk to avoid side effects such as installing a PyOS_InputHook hook.
When testing IDLE, don't create a Tk to avoid side effects such as installing a PyOS_InputHook hook.
When testing IDLE, don't create a Tk to avoid side effects such as installing a PyOS_InputHook hook.
When testing IDLE, don't create a Tk to avoid side effects such as installing a PyOS_InputHook hook.