From: Terry Jan Reedy Date: Wed, 10 Aug 2016 19:15:25 +0000 (-0400) Subject: Issue #27714: text_textview now passes when re-run in the same process X-Git-Tag: v3.6.0a4~31 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3f3dc89a156c2ab0ea340851dd3d4fd510865163;p=python Issue #27714: text_textview now passes when re-run in the same process because test_idle failed while running with test -w (and no -jn). Prevent a non-fatal warning from test_config_key. --- diff --git a/Lib/idlelib/idle_test/test_config_key.py b/Lib/idlelib/idle_test/test_config_key.py index 8109829f10..59d8e817e3 100644 --- a/Lib/idlelib/idle_test/test_config_key.py +++ b/Lib/idlelib/idle_test/test_config_key.py @@ -1,6 +1,6 @@ ''' Test idlelib.config_key. -Coverage: 56% +Coverage: 56% from creating and closing dialog. ''' from idlelib import config_key from test.support import requires @@ -17,6 +17,7 @@ class GetKeysTest(unittest.TestCase): @classmethod def tearDownClass(cls): + cls.root.update() # Stop "can't run event command" warning. cls.root.destroy() del cls.root diff --git a/Lib/idlelib/idle_test/test_textview.py b/Lib/idlelib/idle_test/test_textview.py index 0c625eefe9..c1edcb040c 100644 --- a/Lib/idlelib/idle_test/test_textview.py +++ b/Lib/idlelib/idle_test/test_textview.py @@ -22,8 +22,7 @@ def setUpModule(): root = Tk() def tearDownModule(): - global root, TV - del TV + global root root.update_idletasks() root.destroy() # pyflakes falsely sees root as undefined del root