diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2019-06-16 20:33:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-16 20:33:56 (GMT) |
commit | 66d47da86aff15be34adbec02596bb3188684c0d (patch) | |
tree | 3626db1eed0b92e5676a81bea62303dbe1abdebf /Lib/idlelib | |
parent | c83356cae2e375324ff4a3fb5d574ebde5c827a9 (diff) | |
download | cpython-66d47da86aff15be34adbec02596bb3188684c0d.zip cpython-66d47da86aff15be34adbec02596bb3188684c0d.tar.gz cpython-66d47da86aff15be34adbec02596bb3188684c0d.tar.bz2 |
bpo-37220: Fix 2.7 test -R crash on Windows. (GH-13957)
The patch needed for 2.7 should make the test more stable on 3.x also.
Diffstat (limited to 'Lib/idlelib')
-rw-r--r-- | Lib/idlelib/idle_test/test_searchbase.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/idlelib/idle_test/test_searchbase.py b/Lib/idlelib/idle_test/test_searchbase.py index e08268f..aee0c4c 100644 --- a/Lib/idlelib/idle_test/test_searchbase.py +++ b/Lib/idlelib/idle_test/test_searchbase.py @@ -48,7 +48,6 @@ class SearchDialogBaseTest(unittest.TestCase): self.dialog.default_command = None toplevel = Toplevel(self.root) - self.addCleanup(toplevel.destroy) text = Text(toplevel) self.dialog.open(text) self.assertEqual(self.dialog.top.state(), 'normal') @@ -57,7 +56,8 @@ class SearchDialogBaseTest(unittest.TestCase): self.dialog.open(text, searchphrase="hello") self.assertEqual(self.dialog.ent.get(), 'hello') - self.dialog.close() + toplevel.update_idletasks() + toplevel.destroy() def test_create_widgets(self): self.dialog.create_entries = Func() |