]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[2.7] Fix 2.7 test -R test_IDLE failure on Windows (GH-13958)
authorTerry Jan Reedy <tjreedy@udel.edu>
Sun, 16 Jun 2019 20:36:23 +0000 (16:36 -0400)
committerGitHub <noreply@github.com>
Sun, 16 Jun 2019 20:36:23 +0000 (16:36 -0400)
Cherry-picked from 66d47da.

Lib/idlelib/idle_test/test_searchdialogbase.py

index 7ca6bbf6934709ca2d04d1a48ed356214e676a50..59b9bbf30f2e63b2a2bfcb634aa0d6c8ae677ffc 100644 (file)
@@ -46,7 +46,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')
@@ -55,7 +54,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()