]> granicus.if.org Git - python/commitdiff
[3.6]bpo-30642: Fix ref leak in idle_test.test_macosx (#2163) (#2165)
authorterryjreedy <tjreedy@udel.edu>
Tue, 13 Jun 2017 15:52:08 +0000 (11:52 -0400)
committerGitHub <noreply@github.com>
Tue, 13 Jun 2017 15:52:08 +0000 (11:52 -0400)
(cherry picked from commit 8323189ff1a19566f923c04b95e4d17fa57d1f56)

Lib/idlelib/idle_test/test_macosx.py

index 775697b278d30dda5b176b133fac17258ebc11ff..3d85f3ca72254ca091d3ae1ff28970c197ac69c4 100644 (file)
@@ -77,6 +77,10 @@ class SetupTest(unittest.TestCase):
         requires('gui')
         cls.root = tk.Tk()
         cls.root.withdraw()
+        def cmd(tkpath, func):
+            assert isinstance(tkpath, str)
+            assert isinstance(func, type(cmd))
+        cls.root.createcommand = cmd
 
     @classmethod
     def tearDownClass(cls):