Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-88496: IDLE - fix another test on macOS
Needed for Catalina: test_sidebar add 'idletasks' and skip assert.
  • Loading branch information
terryjreedy committed May 2, 2023
commit fd0948ade7339b585ec86bb19e3dfd7185efaeb3
5 changes: 3 additions & 2 deletions 5 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ordinarily I would ask if this test should continue to run on XQuartz if the problem is only on Aqua:

Suggested change
if sys.platform != 'darwin': # .update_idletasks() does not work.
if text._windowingsystem != 'aqua': # .update_idletasks() does not work.

But this test was already failing on Aqua and XQuartz due to incorrectly negative delta. So this failure may have nothing to do with .update_idletasks(), and the test should not be skipped on Aqua or XQuartz. See #103820, #103821

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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.