[Python-checkins] cpython: Issue #27312: Fix TypeError in test_setupapp

berker.peksag python-checkins at python.org
Fri Jun 17 21:17:40 EDT 2016


https://hg.python.org/cpython/rev/61bd6974405f
changeset:   102077:61bd6974405f
user:        Berker Peksag <berker.peksag at gmail.com>
date:        Sat Jun 18 04:18:24 2016 +0300
summary:
  Issue #27312: Fix TypeError in test_setupapp

files:
  Lib/idlelib/idle_test/test_macosx.py |  5 ++++-
  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
--- a/Lib/idlelib/idle_test/test_macosx.py
+++ b/Lib/idlelib/idle_test/test_macosx.py
@@ -84,7 +84,7 @@
         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 @@
             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__':

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list