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) | |||
vstinner
Jun 2, 2021
Member
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
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
taleinat
Jun 2, 2021
Author
Contributor
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.
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.
taleinat
Jun 2, 2021
Author
Contributor
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?
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?
vstinner
Jun 2, 2021
Member
No, it's fine.
No, it's fine.
|
LGTM. Well, I don't understand how Tkinter handles time, so let's see if 50 ms is enough for everyone :-p |
|
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