diff options
| author | Terry Jan Reedy <tjreedy@udel.edu> | 2018-06-19 23:12:52 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-06-19 23:12:52 (GMT) |
| commit | 4d92158f4c3917fc4fbfebff15224e74782abf79 (patch) | |
| tree | a3eea4b4e5e9d9b9b679eb538d9716758776c3bb /Lib/idlelib/idle_test/test_search.py | |
| parent | 00f9edb98dd64e14daf5c44f303deca5cbc3cdeb (diff) | |
| download | cpython-4d92158f4c3917fc4fbfebff15224e74782abf79.zip cpython-4d92158f4c3917fc4fbfebff15224e74782abf79.tar.gz cpython-4d92158f4c3917fc4fbfebff15224e74782abf79.tar.bz2 | |
bpo-33855: Still more edits and minimal tests for IDLE (GH-7784)
Part 3 of 3, continuing PR #7689. This covers 14 idlelib modules and their tests,
rpc to zoomheight except for run (already done) and tooltip (being done separately).
Diffstat (limited to 'Lib/idlelib/idle_test/test_search.py')
| -rw-r--r-- | Lib/idlelib/idle_test/test_search.py | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/Lib/idlelib/idle_test/test_search.py b/Lib/idlelib/idle_test/test_search.py index 3ab7295..de703c1 100644 --- a/Lib/idlelib/idle_test/test_search.py +++ b/Lib/idlelib/idle_test/test_search.py @@ -1,25 +1,23 @@ -"""Test SearchDialog class in idlelib.search.py""" +"Test search, coverage 69%." + +from idlelib import search +import unittest +from test.support import requires +requires('gui') +from tkinter import Tk, Text, BooleanVar +from idlelib import searchengine # Does not currently test the event handler wrappers. # A usage test should simulate clicks and check highlighting. # Tests need to be coordinated with SearchDialogBase tests # to avoid duplication. -from test.support import requires -requires('gui') - -import unittest -import tkinter as tk -from tkinter import BooleanVar -import idlelib.searchengine as se -import idlelib.search as sd - class SearchDialogTest(unittest.TestCase): @classmethod def setUpClass(cls): - cls.root = tk.Tk() + cls.root = Tk() @classmethod def tearDownClass(cls): @@ -27,10 +25,10 @@ class SearchDialogTest(unittest.TestCase): del cls.root def setUp(self): - self.engine = se.SearchEngine(self.root) - self.dialog = sd.SearchDialog(self.root, self.engine) + self.engine = searchengine.SearchEngine(self.root) + self.dialog = search.SearchDialog(self.root, self.engine) self.dialog.bell = lambda: None - self.text = tk.Text(self.root) + self.text = Text(self.root) self.text.insert('1.0', 'Hello World!') def test_find_again(self): |
