diff options
| author | Terry Jan Reedy <tjreedy@udel.edu> | 2018-06-19 19:12:52 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-06-19 19:12:52 -0400 |
| commit | 4d92158f4c3917fc4fbfebff15224e74782abf79 (patch) | |
| tree | a3eea4b4e5e9d9b9b679eb538d9716758776c3bb /Lib/idlelib/idle_test/test_searchengine.py | |
| parent | 00f9edb98dd64e14daf5c44f303deca5cbc3cdeb (diff) | |
| download | cpython-git-4d92158f4c3917fc4fbfebff15224e74782abf79.tar.gz | |
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_searchengine.py')
| -rw-r--r-- | Lib/idlelib/idle_test/test_searchengine.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/Lib/idlelib/idle_test/test_searchengine.py b/Lib/idlelib/idle_test/test_searchengine.py index b3aa8eb812..3d26d62a95 100644 --- a/Lib/idlelib/idle_test/test_searchengine.py +++ b/Lib/idlelib/idle_test/test_searchengine.py @@ -1,18 +1,19 @@ -'''Test functions and SearchEngine class in idlelib.searchengine.py.''' +"Test searchengine, coverage 99%." -# With mock replacements, the module does not use any gui widgets. -# The use of tk.Text is avoided (for now, until mock Text is improved) -# by patching instances with an index function returning what is needed. -# This works because mock Text.get does not use .index. - -import re +from idlelib import searchengine as se import unittest # from test.support import requires from tkinter import BooleanVar, StringVar, TclError # ,Tk, Text import tkinter.messagebox as tkMessageBox -from idlelib import searchengine as se from idlelib.idle_test.mock_tk import Var, Mbox from idlelib.idle_test.mock_tk import Text as mockText +import re + +# With mock replacements, the module does not use any gui widgets. +# The use of tk.Text is avoided (for now, until mock Text is improved) +# by patching instances with an index function returning what is needed. +# This works because mock Text.get does not use .index. +# The tkinter imports are used to restore searchengine. def setUpModule(): # Replace s-e module tkinter imports other than non-gui TclError. @@ -326,4 +327,4 @@ class ForwardBackwardTest(unittest.TestCase): if __name__ == '__main__': - unittest.main(verbosity=2, exit=2) + unittest.main(verbosity=2) |
