[issue35771] IDLE: Fix tooltip Hovertiptest failure

Tal Einat report at bugs.python.org
Sat Jan 19 11:41:54 EST 2019


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

This is due to the test using a 50ms delay on hover, and checking "immediately" after generating an "<Enter>" event that it hasn't triggered yet.  Note that this isn't actually "immediately": The Tk root's update() is called in between to simulate having a live Tk event loop.

On slow machines this could indeed fail due to the update() call taking a while.

I originally chose 50ms since it seemed like more than enough. Using a longer delay would make the test more robust, but would make testing unnecessarily slow on fast machines.

Perhaps we should look for a more general solution, such as multiplying all test time values by a scale factor depending on a machine's execution speed?  That would avoid such future errors in many tests, while keeping the tests faster on fast machines.

Otherwise let's just increase this to 100ms or 200ms.

----------

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


More information about the Python-bugs-list mailing list