cpython/Lib/test/test_tkinter
Miss Islington (bot) f43f4384cc
[3.15] gh-151678: Add interactive tests for tkinter.simpledialog (GH-151794) (GH-151802)
Drive the modal query dialogs with generated events to exercise the
<Return> and <Escape> key bindings and the value validation: accepting
an integer, float or string, cancelling, rejecting a non-numeric value
and rejecting a value outside the allowed range.
(cherry picked from commit 706238e764)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 16:54:36 +00:00
..
__init__.py gh-65784: Add support for parametrized resource wantobjects in regrtests (GH-143570) 2026-01-16 18:38:38 +02:00
__main__.py
README
support.py gh-65784: Add support for parametrized resource wantobjects in regrtests (GH-143570) 2026-01-16 18:38:38 +02:00
test_colorchooser.py gh-65784: Add support for parametrized resource wantobjects in regrtests (GH-143570) 2026-01-16 18:38:38 +02:00
test_dnd.py [3.15] gh-151678: Add tests for tkinter.dnd (GH-151780) (GH-151790) 2026-06-20 13:37:55 +00:00
test_filedialog.py [3.15] gh-151678: Add tests for tkinter.filedialog (GH-151781) (GH-151795) 2026-06-20 13:49:16 +00:00
test_font.py [3.15] gh-151678: Add tests for tkinter font, image, variable, Misc and Wm methods (GH-151751) (GH-151754) 2026-06-19 23:12:25 +00:00
test_geometry_managers.py [3.15] gh-151678: Add tests for tkinter Misc, Wm and geometry manager methods (GH-151732) (GH-151737) 2026-06-19 18:06:42 +03:00
test_images.py [3.15] gh-151678: Add tests for tkinter font, image, variable, Misc and Wm methods (GH-151751) (GH-151754) 2026-06-19 23:12:25 +00:00
test_loadtk.py gh-65784: Add support for parametrized resource wantobjects in regrtests (GH-143570) 2026-01-16 18:38:38 +02:00
test_messagebox.py gh-65784: Add support for parametrized resource wantobjects in regrtests (GH-143570) 2026-01-16 18:38:38 +02:00
test_misc.py [3.15] gh-151678: Add tests for the remaining tkinter Misc, Wm and Text methods (GH-151782) (GH-151799) 2026-06-20 14:12:08 +00:00
test_scrolledtext.py [3.15] gh-151678: Add tests for tkinter.scrolledtext (GH-151753) (GH-151759) 2026-06-20 09:17:52 +03:00
test_simpledialog.py [3.15] gh-151678: Add interactive tests for tkinter.simpledialog (GH-151794) (GH-151802) 2026-06-21 16:54:36 +00:00
test_text.py [3.15] gh-151678: Add tests for the remaining tkinter Misc, Wm and Text methods (GH-151782) (GH-151799) 2026-06-20 14:12:08 +00:00
test_variables.py [3.15] gh-151678: Add tests for tkinter font, image, variable, Misc and Wm methods (GH-151751) (GH-151754) 2026-06-19 23:12:25 +00:00
test_widgets.py [3.15] gh-151678: Add tests for tkinter widget virtual events (GH-151793) (GH-151805) 2026-06-20 15:00:38 +00:00
widget_tests.py gh-145736: Fix Tkinter tests for Tk 8.7, 9.0 and 9.1 (GH-145738) 2026-03-11 21:01:03 +02:00

Writing new tests
=================

Precaution
----------

    New tests should always use only one Tk window at once, like all the
    current tests do. This means that you have to destroy the current window
    before creating another one, and clean up after the test. The motivation
    behind this is that some tests may depend on having its window focused
    while it is running to work properly, and it may be hard to force focus
    on your window across platforms (right now only test_traversal at
    test_ttk.test_widgets.NotebookTest depends on this).