Skip to content

Commit

Permalink
pythongh-88496: IDLE - fix another test on macOS (python#104075)
Browse files Browse the repository at this point in the history
Needed for Catalina: test_sidebar add 'idletasks' and skip assert.
  • Loading branch information
terryjreedy authored May 2, 2023
1 parent f73abf8 commit 690df4c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Lib/idlelib/idle_test/test_sidebar.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def setUpClass(cls):
@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

Expand Down Expand Up @@ -695,7 +695,8 @@ def test_mousewheel(self):
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)
Expand Down

0 comments on commit 690df4c

Please sign in to comment.