[Python-checkins] bpo-43981: Fix error in idle-test leak test (GH-25739)

terryjreedy webhook-mailer at python.org
Thu Apr 29 23:52:56 EDT 2021


https://github.com/python/cpython/commit/a62e424de0c394cda178a8d934d06f0559b5e28d
commit: a62e424de0c394cda178a8d934d06f0559b5e28d
branch: master
author: Terry Jan Reedy <tjreedy at udel.edu>
committer: terryjreedy <tjreedy at udel.edu>
date: 2021-04-29T23:52:47-04:00
summary:

bpo-43981: Fix error in idle-test leak test (GH-25739)

Remove call to macosx.setupApp, which calls macosc.overrideRootMenu, which modifies
the menus, which results in two failures in the second round of the leak test.

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 7228d0ee731fa..0497f6d05139e 100644
--- a/Lib/idlelib/idle_test/test_sidebar.py
+++ b/Lib/idlelib/idle_test/test_sidebar.py
@@ -7,11 +7,10 @@
 import unittest.mock
 from test.support import requires, swap_attr
 import tkinter as tk
-from .tkinter_testing_utils import run_in_tk_mainloop
+from idlelib.idle_test.tkinter_testing_utils import run_in_tk_mainloop
 
 from idlelib.delegator import Delegator
 from idlelib.editor import fixwordbreaks
-from idlelib import macosx
 from idlelib.percolator import Percolator
 import idlelib.pyshell
 from idlelib.pyshell import fix_x11_paste, PyShell, PyShellFileList
@@ -408,7 +407,7 @@ def setUpClass(cls):
         fix_x11_paste(root)
 
         cls.flist = flist = PyShellFileList(root)
-        macosx.setupApp(root, flist)
+        # See #43981 about macosx.setupApp(root, flist) causing failure.
         root.update_idletasks()
 
         cls.init_shell()



More information about the Python-checkins mailing list