8000 bpo-42142: Try to fix timeouts in ttk tests by serhiy-storchaka · Pull Request #23474 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-42142: Try to fix timeouts in ttk tests #23474

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

Merged

Conversation

serhiy-storchaka
Copy link
Member
@serhiy-storchaka serhiy-storchaka commented Nov 23, 2020

Check whether the widget is already visible before waiting a <VisibilityNotify> event.

https://bugs.python.org/issue42142

Check whether the widget is already visible before waiting a <VisibilityNotify> event.
@E-Paine
Copy link
Contributor
E-Paine commented Nov 24, 2020

Also addresses bpo-42370

@serhiy-storchaka
Copy link
Member Author
serhiy-storchaka commented Nov 24, 2020

It does not address bpo-42370, it just adds new checks. If the error like in bpo-42370 happens they can give more information. This is a rare failure, after having more information we can try to write a workaround.

@terryjreedy
Copy link
Member

Putting repeated problematic test im a function is a great idea.

Pipelines Windows tests failed consistently with "RuntimeError: Widget .!labeledscale is still not mapped". Presume same for GH Actions. Maybe revert to wait_visibility on Windows, where it apparently always worked?

@serhiy-storchaka
Copy link
Member Author

Actually, using update() seems enough.

wait_visibility() just waits VisibilityNotify or DestroyNotify events in dead loop. If the widget is already visible it never ends. winfo_ismapped() could be used to check that the widget is already visible, but it does not work on Windows.

@serhiy-storchaka serhiy-storchaka changed the title bpo-42142: Fix timeouts in ttk tests bpo-42142: Try to fix timeouts in ttk tests Nov 30, 2020
@serhiy-storchaka serhiy-storchaka merged commit 6cc2c41 into python:master Nov 30, 2020
@miss-islington
Copy link
Contributor

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8, 3.9.
🐍🍒⛏🤖

@serhiy-storchaka serhiy-storchaka deleted the test-ttk-wait-visibility branch November 30, 2020 08:24
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 30, 2020
Instead of using wait_visibility() which waits event <VisibilityNotify> in dead loop
use update() which should proceed all queued events.
(cherry picked from commit 6cc2c41)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-bot
Copy link

GH-23565 is a backport of this pull request to the 3.9 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label Nov 30, 2020
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 30, 2020
Instead of using wait_visibility() which waits event <VisibilityNotify> in dead loop
use update() which should proceed all queued events.
(cherry picked from commit 6cc2c41)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-bot
Copy link

GH-23566 is a backport of this pull request to the 3.8 branch.

miss-islington added a commit that referenced this pull request Nov 30, 2020
Instead of using wait_visibility() which waits event <VisibilityNotify> in dead loop
use update() which should proceed all queued events.
(cherry picked from commit 6cc2c41)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
miss-islington added a commit that referenced this pull request Nov 30, 2020
Instead of using wait_visibility() which waits event <VisibilityNotify> in dead loop
use update() which should proceed all queued events.
(cherry picked from commit 6cc2c41)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
Instead of using wait_visibility() which waits event <VisibilityNotify> in dead loop
use update() which should proceed all queued events.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
0