]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #23184: idle tests, remove unused names and imports.
authorTerry Jan Reedy <tjreedy@udel.edu>
Sat, 16 May 2015 03:55:15 +0000 (23:55 -0400)
committerTerry Jan Reedy <tjreedy@udel.edu>
Sat, 16 May 2015 03:55:15 +0000 (23:55 -0400)
Lib/idlelib/idle_test/test_autocomplete.py
Lib/idlelib/idle_test/test_formatparagraph.py
Lib/idlelib/idle_test/test_searchdialogbase.py
Lib/idlelib/idle_test/test_searchengine.py
Lib/idlelib/idle_test/test_text.py

index ee9d0eda5d1a174edc346ac1092b5e0bfe06e7b2..c2a72666be59f5c8a2aaa4fe32b7f6993f08c94a 100644 (file)
@@ -1,6 +1,6 @@
 import unittest
 from test.test_support import requires
-from Tkinter import Tk, Text, TclError
+from Tkinter import Tk, Text
 
 import idlelib.AutoComplete as ac
 import idlelib.AutoCompleteWindow as acw
@@ -95,8 +95,8 @@ class AutoCompleteTest(unittest.TestCase):
         del ev.mc_state
 
         # If autocomplete window is open, complete() method is called
-        testwin = self.autocomplete._make_autocomplete_window()
         self.text.insert('1.0', 're.')
+        # This must call autocomplete._make_autocomplete_window()
         Equal(self.autocomplete.autocomplete_event(ev), 'break')
 
         # If autocomplete window is not active or does not exist,
index 07bbf16e879e4807329da040583804ed16ee7def..9185a968a65c5f8769f4e4952bce80e38fb8ea1d 100644 (file)
@@ -2,7 +2,7 @@
 import unittest
 from idlelib import FormatParagraph as fp
 from idlelib.EditorWindow import EditorWindow
-from Tkinter import Tk, Text, TclError
+from Tkinter import Tk, Text
 from test.test_support import requires
 
 
index c1bee3e6f17a31aca5fea09f5465887f600f3179..32abfe6f792dc12f36d68a75d05c3355592ccd7c 100644 (file)
@@ -6,14 +6,13 @@ testing skipping of suite when self.needwrapbutton is false.
 '''
 import unittest
 from test.test_support import requires
-from Tkinter import Tk, Toplevel, Frame, Label, BooleanVar, StringVar
+from Tkinter import Tk, Toplevel, Frame ## BooleanVar, StringVar
 from idlelib import SearchEngine as se
 from idlelib import SearchDialogBase as sdb
 from idlelib.idle_test.mock_idle import Func
-from idlelib.idle_test.mock_tk import Var, Mbox
+##from idlelib.idle_test.mock_tk import Var
 
-# The following could help make some tests gui-free.
-# However, they currently make radiobutton tests fail.
+# The ## imports above & following could help make some tests gui-free.# However, they currently make radiobutton tests fail.
 ##def setUpModule():
 ##    # Replace tk objects used to initialize se.SearchEngine.
 ##    se.BooleanVar = Var
index 2525a135c2ec9c3a4aa3ed9ae10097c25e39cd10..8bf9d4728a092731248368c80ae10c69bbea4f6e 100644 (file)
@@ -7,7 +7,7 @@
 
 import re
 import unittest
-from test.test_support import requires
+#from test.test_support import requires
 from Tkinter import  BooleanVar, StringVar, TclError  # ,Tk, Text
 import tkMessageBox
 from idlelib import SearchEngine as se
index f0b9b762f1c05a3d6e8a99523b3eeeeb9c43d9c6..50d3facec7cfa188c84b1bcd8624a2a1caf4d5f7 100644 (file)
@@ -3,7 +3,6 @@ import unittest
 from test.test_support import requires
 
 from _tkinter import TclError
-import Tkinter as tk
 
 class TextTest(object):