mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
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).
This commit is contained in:
parent
00f9edb98d
commit
4d92158f4c
36 changed files with 358 additions and 97 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue