diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2023-05-02 02:53:16 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-02 02:53:16 (GMT) |
commit | 690df4c16ca4f0054d27a6148da9e6af809a2658 (patch) | |
tree | d59bd8e2047158a63bb05300e3e53763f38c756d /Lib/idlelib | |
parent | f73abf8e03fd370c86fbb2a249fe1e065f7d84b4 (diff) | |
download | cpython-690df4c16ca4f0054d27a6148da9e6af809a2658.zip cpython-690df4c16ca4f0054d27a6148da9e6af809a2658.tar.gz cpython-690df4c16ca4f0054d27a6148da9e6af809a2658.tar.bz2 |
gh-88496: IDLE - fix another test on macOS (#104075)
Needed for Catalina: test_sidebar add 'idletasks' and skip assert.
Diffstat (limited to 'Lib/idlelib')
-rw-r--r-- | Lib/idlelib/idle_test/test_sidebar.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/idlelib/idle_test/test_sidebar.py b/Lib/idlelib/idle_test/test_sidebar.py index 5506fd2..fb52b3a 100644 --- a/Lib/idlelib/idle_test/test_sidebar.py +++ b/Lib/idlelib/idle_test/test_sidebar.py @@ -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) |