-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-44282: fix occasional test_incremental_editing failures on buildbots #26491
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
bpo-44282: fix occasional test_incremental_editing failures on buildbots #26491
Conversation
Signed-off-by: Tal Einat <532281+taleinat@users.noreply.github.com>
@@ -551,7 +551,7 @@ def test_long_multiline_string(self): | |||
''') | |||
self._assert_highlighting(source, {'STRING': [('1.0', '5.4')]}) | |||
|
|||
@run_in_tk_mainloop | |||
@run_in_tk_mainloop(delay=50) |
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.
What is this magic number? A number of seconds?
I suggest you to use test.support.SHORT_TIMEOUT or test.support.LONG_TIMEOUT: https://docs.python.org/dev/library/test.html#test.support.SHORT_TIMEOUT
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.
What is this magic number? A number of seconds?
Milliseconds. It's explained in the decorator's doc-string.
I suggest you to use test.support.SHORT_TIMEOUT or test.support.LONG_TIMEOUT
I wasn't aware of these, good to know! I don't think they're quite what's needed here though.
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.
What is this magic number? A number of seconds?
Milliseconds. It's explained in the decorator's doc-string.
Would you prefer that this was a datetime.timedelta
instance?
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.
No, it's fine.
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.
LGTM. Well, I don't understand how Tkinter handles time, so let's see if 50 ms is enough for everyone :-p
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.
Exactly what I meant as an alternative to skipping. While the latter would be okay for this test, we may have other tests where a much smaller delay, even 2 or 3 is sufficient.
…ots (pythonGH-26491) Signed-off-by: Tal Einat <532281+taleinat@users.noreply.github.com> (cherry picked from commit adef445) Co-authored-by: Tal Einat <532281+taleinat@users.noreply.github.com>
GH-26499 is a backport of this pull request to the 3.10 branch. |
I merge the issue right now since it broke buildbots and I'm trying to recover the green color of buildbots! |
A note to myself: Backport the revised tkinter helper file to 3.9 so we can use it with future tests that get backported to 3.9. |
Note that the helper is currently missing on the 3.9 branch, as it was added as part of the PR which added the shell sidebar, which we haven't backported to 3.9. We'd likely want to backport that PR to 3.9 first. |
https://bugs.python.org/issue44282