summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2016-06-18 01:18:24 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2016-06-18 01:18:24 (GMT)
commit75a25867ab96f1fe8a4295775fbcbb171bde693b (patch)
tree913c85135b37acde6f8871b432b12cbe40ad3039
parentfdb6ef774a4835acb6f10d0ee6901eab0dc92645 (diff)
downloadcpython-75a25867ab96f1fe8a4295775fbcbb171bde693b.zip
cpython-75a25867ab96f1fe8a4295775fbcbb171bde693b.tar.gz
cpython-75a25867ab96f1fe8a4295775fbcbb171bde693b.tar.bz2
Issue #27312: Fix TypeError in test_setupapp
-rw-r--r--Lib/idlelib/idle_test/test_macosx.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/idlelib/idle_test/test_macosx.py b/Lib/idlelib/idle_test/test_macosx.py
index 189dc48..3c6161c 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__':