mirror of
https://github.com/python/cpython.git
synced 2025-08-18 15:51:23 +00:00
bpo-35771: IDLE: Fix flaky tool-tip hover delay tests (GH-15634)
Extending the hover delay in test_tooltip should avoid spurious test_idle failures.
One longer delay instead of two shorter delays results in a net speedup.
(cherry picked from commit 132acaba5a
)
Co-authored-by: Tal Einat <taleinat+github@gmail.com>
This commit is contained in:
parent
b365cfae46
commit
1c18aec3bb
4 changed files with 68 additions and 48 deletions
|
@ -75,7 +75,7 @@ class TooltipBase(object):
|
|||
if tw:
|
||||
try:
|
||||
tw.destroy()
|
||||
except TclError:
|
||||
except TclError: # pragma: no cover
|
||||
pass
|
||||
|
||||
|
||||
|
@ -103,8 +103,8 @@ class OnHoverTooltipBase(TooltipBase):
|
|||
def __del__(self):
|
||||
try:
|
||||
self.anchor_widget.unbind("<Enter>", self._id1)
|
||||
self.anchor_widget.unbind("<Leave>", self._id2)
|
||||
self.anchor_widget.unbind("<Button>", self._id3)
|
||||
self.anchor_widget.unbind("<Leave>", self._id2) # pragma: no cover
|
||||
self.anchor_widget.unbind("<Button>", self._id3) # pragma: no cover
|
||||
except TclError:
|
||||
pass
|
||||
super(OnHoverTooltipBase, self).__del__()
|
||||
|
@ -137,7 +137,7 @@ class OnHoverTooltipBase(TooltipBase):
|
|||
"""hide the tooltip"""
|
||||
try:
|
||||
self.unschedule()
|
||||
except TclError:
|
||||
except TclError: # pragma: no cover
|
||||
pass
|
||||
super(OnHoverTooltipBase, self).hidetip()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue