gh-88496: IDLE - fix another test on macOS (#104075)

Needed for Catalina: test_sidebar add 'idletasks' and skip assert.
This commit is contained in:
Terry Jan Reedy 2023-05-01 22:53:16 -04:00 committed by GitHub
parent f73abf8e03
commit 690df4c16c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -57,7 +57,7 @@ class LineNumbersTest(unittest.TestCase):
@classmethod
def tearDownClass(cls):
cls.editwin.per.close()
cls.root.update()
cls.root.update_idletasks()
cls.root.destroy()
del cls.text, cls.text_frame, cls.editwin, cls.root
@ -695,7 +695,8 @@ class ShellSidebarTest(unittest.TestCase):
delta = -1 if sys.platform == 'darwin' else 120
sidebar.canvas.event_generate('<MouseWheel>', x=0, y=0, delta=delta)
yield
self.assertIsNone(text.dlineinfo(text.index(f'{last_lineno}.0')))
if sys.platform != 'darwin': # .update_idletasks() does not work.
self.assertIsNone(text.dlineinfo(text.index(f'{last_lineno}.0')))
# Scroll back down using the <Button-5> event.
sidebar.canvas.event_generate('<Button-5>', x=0, y=0)