Kaydet (Commit) 75a25867 authored tarafından Berker Peksag's avatar Berker Peksag

Issue #27312: Fix TypeError in test_setupapp

üst fdb6ef77
......@@ -84,7 +84,7 @@ class SetupTest(unittest.TestCase):
del cls.root
@mock.patch('idlelib.macosx.overrideRootMenu') #27312
def test_setupapp(self):
def test_setupapp(self, overrideRootMenu):
"Call setupApp with each possible graphics type."
root = self.root
flist = FileList(root)
......@@ -92,6 +92,9 @@ class SetupTest(unittest.TestCase):
with self.subTest(tktype=tktype):
macosx._tk_type = tktype
macosx.setupApp(root, flist)
if tktype in ('carbon', 'cocoa'):
self.assertTrue(overrideRootMenu.called)
overrideRootMenu.reset_mock()
if __name__ == '__main__':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment