From: Berker Peksag Date: Sat, 18 Jun 2016 01:18:24 +0000 (+0300) Subject: Issue #27312: Fix TypeError in test_setupapp X-Git-Tag: v3.6.0a3~126 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=75a25867ab96f1fe8a4295775fbcbb171bde693b;p=thirdparty%2FPython%2Fcpython.git Issue #27312: Fix TypeError in test_setupapp --- diff --git a/Lib/idlelib/idle_test/test_macosx.py b/Lib/idlelib/idle_test/test_macosx.py index 189dc486ca28..3c6161c5182b 100644 --- a/Lib/idlelib/idle_test/test_macosx.py +++ b/Lib/idlelib/idle_test/test_macosx.py @@ -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__':