[issue44282] IDLE: ColorDelegatorTest test_incremental_editing failures

Tal Einat report at bugs.python.org
Wed Jun 2 15:31:55 EDT 2021


Tal Einat <taleinat+python at gmail.com> added the comment:

> Running 12 duplicate tests in parallel on Windows on a 6 core (12 CPU) machine with [...] resulted in nearly all failing.

Yes, running test_idle in parallel with itself usually causes some failures due to UI focus being stolen from one instance by another.  That's why I just ran this test rather than the whole test suite.

> I am reluctant to add a delay that is mostly not needed, so i tried the uploaded 'adaptive' code to only add a long delay if needed.  Uploaded.  But when a tested failed once, it failed again even with the delay, and contrary to the results above.

The delay needs to be placed carefully.  Changing root.after(1, ...) to use 50 rather than 1 (these are milliseconds) seems to resolve the issue entirely on my machine, at the cost of this single test taking 0.4 seconds to run rather than about 0.045 seconds.

> The other thing I thought is parameterizing the decorator to pass in a delay only for this test, but that require another layer of wrapping, which I cannot do right now.

I can do that.  Though I fear this may happen for other such tests as well...  Worth a shot I guess.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44282>
_______________________________________


More information about the Python-bugs-list mailing list