diff --git a/Lib/test/test_tkinter/test_simpledialog.py b/Lib/test/test_tkinter/test_simpledialog.py index 942b7ebf7120b3..64edbb645bc80f 100644 --- a/Lib/test/test_tkinter/test_simpledialog.py +++ b/Lib/test/test_tkinter/test_simpledialog.py @@ -49,6 +49,7 @@ def test_default_button(self): def test_return_activates_default(self): # invokes the default button. d = self.create() # default 0 + self.require_mapped(d.root) d.root.focus_force() d.root.update() d.root.event_generate('') @@ -59,6 +60,7 @@ def test_return_no_default(self): # With no default button, rings the bell and leaves the dialog # open instead of activating a button. d = self.create(default=None) + self.require_mapped(d.root) d.root.focus_force() d.root.update() bells = []