summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-06-16 13:52:25 -0700
committerGitHub <noreply@github.com>2019-06-16 13:52:25 -0700
commit0c45aee8036a27fb76d6d8d4bac61c3715aec22d (patch)
treefce93b135677f682611f05b027cb17a270be6638
parentc289588905daac804ef9c4ebaf51fc13f93b4a01 (diff)
downloadcpython-git-0c45aee8036a27fb76d6d8d4bac61c3715aec22d.tar.gz
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. (cherry picked from commit 66d47da86aff15be34adbec02596bb3188684c0d) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
-rw-r--r--Lib/idlelib/idle_test/test_searchbase.py4
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 e08268fde2..aee0c4c699 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()