[Python-checkins] [3.11] gh-88496: IDLE - fix another test on macOS (GH-104075) (#104076)
terryjreedy
webhook-mailer at python.org
Mon May 1 23:23:04 EDT 2023
https://github.com/python/cpython/commit/9f191a1a7760187f6ce116b6a87c4765637ebe57
commit: 9f191a1a7760187f6ce116b6a87c4765637ebe57
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: terryjreedy <tjreedy at udel.edu>
date: 2023-05-02T03:22:57Z
summary:
[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 690df4c16ca4f0054d27a6148da9e6af809a2658)
Co-authored-by: Terry Jan Reedy <tjreedy at udel.edu>
files:
M Lib/idlelib/idle_test/test_sidebar.py
diff --git a/Lib/idlelib/idle_test/test_sidebar.py b/Lib/idlelib/idle_test/test_sidebar.py
index 5506fd2b0e22..fb52b3a01795 100644
--- a/Lib/idlelib/idle_test/test_sidebar.py
+++ b/Lib/idlelib/idle_test/test_sidebar.py
@@ -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
@@ -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)
More information about the Python-checkins
mailing list