[Python-checkins] cpython: Issue #27714: text_textview now passes when re-run in the same process

terry.reedy python-checkins at python.org
Wed Aug 10 15:15:39 EDT 2016


https://hg.python.org/cpython/rev/b10a312f6d00
changeset:   102608:b10a312f6d00
user:        Terry Jan Reedy <tjreedy at udel.edu>
date:        Wed Aug 10 15:15:25 2016 -0400
summary:
  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.

files:
  Lib/idlelib/idle_test/test_config_key.py |  3 ++-
  Lib/idlelib/idle_test/test_textview.py   |  3 +--
  2 files changed, 3 insertions(+), 3 deletions(-)


diff --git a/Lib/idlelib/idle_test/test_config_key.py b/Lib/idlelib/idle_test/test_config_key.py
--- 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 @@
 
     @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
--- a/Lib/idlelib/idle_test/test_textview.py
+++ b/Lib/idlelib/idle_test/test_textview.py
@@ -22,8 +22,7 @@
     root = Tk()
 
 def tearDownModule():
-    global root, TV
-    del TV
+    global root
     root.update_idletasks()
     root.destroy()  # pyflakes falsely sees root as undefined
     del root

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


More information about the Python-checkins mailing list