Skip to content

Commit 5d55169

Browse files
Keep the root window visible in SimpleDialogTest
SimpleDialog makes its window transient for the master unconditionally on this branch, and a transient of a hidden window is never mapped on Windows, so that go() blocks in wait_visibility().
1 parent 3a17e0b commit 5d55169

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

Lib/test/test_tkinter/test_simpledialog.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,19 @@
44
from test.support import requires, swap_attr
55
from test.test_tkinter.support import setUpModule # noqa: F401
66
from test.test_tkinter.support import (AbstractDefaultRootTest,
7-
AbstractDialogTest)
7+
AbstractDialogTest, AbstractTkTest)
88
from tkinter.simpledialog import (Dialog, SimpleDialog,
99
askinteger, askfloat, askstring,
1010
_QueryInteger, _QueryFloat, _QueryString)
1111

1212
requires('gui')
1313

1414

15-
class SimpleDialogTest(AbstractDialogTest, unittest.TestCase):
15+
class SimpleDialogTest(AbstractTkTest, unittest.TestCase):
16+
# The root window is not hidden here (cf. AbstractDialogTest): SimpleDialog
17+
# makes its window transient for the master unconditionally, and a
18+
# transient of a hidden window is never mapped on Windows, so that go()
19+
# would block in wait_visibility().
1620
# SimpleDialog's modal loop is in go(); its bindings are exercised here by
1721
# generating events on the constructed dialog, without entering the loop.
1822

0 commit comments

Comments
 (0)