mirror of
https://github.com/python/cpython.git
synced 2025-10-02 05:12:23 +00:00
[3.11] gh-88496: IDLE - fix another test on macOS (GH-104075) (#104076)
gh-88496: IDLE - fix another test on macOS (GH-104075)
Needed for Catalina: test_sidebar add 'idletasks' and skip assert.
(cherry picked from commit 690df4c16c
)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
This commit is contained in:
parent
10db28bfcf
commit
9f191a1a77
1 changed files with 3 additions and 2 deletions
|
@ -57,7 +57,7 @@ class LineNumbersTest(unittest.TestCase):
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
cls.editwin.per.close()
|
cls.editwin.per.close()
|
||||||
cls.root.update()
|
cls.root.update_idletasks()
|
||||||
cls.root.destroy()
|
cls.root.destroy()
|
||||||
del cls.text, cls.text_frame, cls.editwin, cls.root
|
del cls.text, cls.text_frame, cls.editwin, cls.root
|
||||||
|
|
||||||
|
@ -695,6 +695,7 @@ class ShellSidebarTest(unittest.TestCase):
|
||||||
delta = -1 if sys.platform == 'darwin' else 120
|
delta = -1 if sys.platform == 'darwin' else 120
|
||||||
sidebar.canvas.event_generate('<MouseWheel>', x=0, y=0, delta=delta)
|
sidebar.canvas.event_generate('<MouseWheel>', x=0, y=0, delta=delta)
|
||||||
yield
|
yield
|
||||||
|
if sys.platform != 'darwin': # .update_idletasks() does not work.
|
||||||
self.assertIsNone(text.dlineinfo(text.index(f'{last_lineno}.0')))
|
self.assertIsNone(text.dlineinfo(text.index(f'{last_lineno}.0')))
|
||||||
|
|
||||||
# Scroll back down using the <Button-5> event.
|
# Scroll back down using the <Button-5> event.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue