]> granicus.if.org Git - python/commitdiff
Fix ref leak in idle_test.test_macosx (#2163)
authorterryjreedy <tjreedy@udel.edu>
Tue, 13 Jun 2017 14:52:29 +0000 (10:52 -0400)
committerGitHub <noreply@github.com>
Tue, 13 Jun 2017 14:52:29 +0000 (10:52 -0400)
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):