Skip to content

Commit

Permalink
Issue python#23184: idle tests, remove unused names and imports.
Browse files Browse the repository at this point in the history
  • Loading branch information
terryjreedy committed May 16, 2015
1 parent 038c16b commit 75fb816
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Lib/idlelib/idle_test/test_autocomplete.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import unittest
from 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
Expand Down Expand Up @@ -95,8 +95,8 @@ def test_autocomplete_event(self):
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,
Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/idle_test/test_formatparagraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.support import requires


Expand Down
6 changes: 3 additions & 3 deletions Lib/idlelib/idle_test/test_searchdialogbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
'''
import unittest
from 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.
# 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.
Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/idle_test/test_searchengine.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import re
import unittest
from test.support import requires
# from test.support import requires
from tkinter import BooleanVar, StringVar, TclError # ,Tk, Text
import tkinter.messagebox as tkMessageBox
from idlelib import SearchEngine as se
Expand Down
1 change: 0 additions & 1 deletion Lib/idlelib/idle_test/test_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from test.support import requires

from _tkinter import TclError
import tkinter as tk

class TextTest(object):

Expand Down

0 comments on commit 75fb816

Please sign in to comment.