Skip to content

Commit 75a2586

Browse files
committed
Issue #27312: Fix TypeError in test_setupapp
1 parent fdb6ef7 commit 75a2586

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Lib/idlelib/idle_test/test_macosx.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,17 @@ def tearDownClass(cls):
8484
del cls.root
8585

8686
@mock.patch('idlelib.macosx.overrideRootMenu') #27312
87-
def test_setupapp(self):
87+
def test_setupapp(self, overrideRootMenu):
8888
"Call setupApp with each possible graphics type."
8989
root = self.root
9090
flist = FileList(root)
9191
for tktype in alltypes:
9292
with self.subTest(tktype=tktype):
9393
macosx._tk_type = tktype
9494
macosx.setupApp(root, flist)
95+
if tktype in ('carbon', 'cocoa'):
96+
self.assertTrue(overrideRootMenu.called)
97+
overrideRootMenu.reset_mock()
9598

9699

97100
if __name__ == '__main__':

0 commit comments

Comments
 (0)