cpython/Lib/test/test_tkinter
Miss Islington (bot) 92bd69674e
[3.13] gh-151678: Add tests for tkinter.Canvas (GH-151683) (GH-151718)
Cover previously-untested Canvas methods in CanvasTest:

* item creation and types, bbox, coordinate conversion, move/scale,
  find and addtag queries, tags, item configuration, stacking order,
  text-item editing, selection, focus, scan and postscript;
* the create_arc, create_oval, create_bitmap, create_image,
  create_text and create_window item creation methods, checking
  coordinates, default and explicit options, valid enumerations and
  rejection of invalid values;
* tag_bind() and tag_unbind(), checking the returned function id and
  binding script, querying bound sequences, the add parameter, event
  delivery to items via a tag, and removal of a single binding by id
  or all bindings for a sequence.
(cherry picked from commit bb127c5a96)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 11:14:14 +00:00
..
__init__.py [3.13] gh-65784: Add support for parametrized resource wantobjects in regrtests (GH-143570) (GH-143914) 2026-01-16 17:01:53 +00:00
__main__.py
README
support.py [3.13] gh-65784: Add support for parametrized resource wantobjects in regrtests (GH-143570) (GH-143914) 2026-01-16 17:01:53 +00:00
test_colorchooser.py [3.13] gh-65784: Add support for parametrized resource wantobjects in regrtests (GH-143570) (GH-143914) 2026-01-16 17:01:53 +00:00
test_font.py [3.13] gh-65784: Add support for parametrized resource wantobjects in regrtests (GH-143570) (GH-143914) 2026-01-16 17:01:53 +00:00
test_geometry_managers.py [3.13] gh-65784: Add support for parametrized resource wantobjects in regrtests (GH-143570) (GH-143914) 2026-01-16 17:01:53 +00:00
test_images.py [3.13] gh-65784: Add support for parametrized resource wantobjects in regrtests (GH-143570) (GH-143914) 2026-01-16 17:01:53 +00:00
test_loadtk.py [3.13] gh-65784: Add support for parametrized resource wantobjects in regrtests (GH-143570) (GH-143914) 2026-01-16 17:01:53 +00:00
test_messagebox.py [3.13] gh-65784: Add support for parametrized resource wantobjects in regrtests (GH-143570) (GH-143914) 2026-01-16 17:01:53 +00:00
test_misc.py [3.13] gh-65784: Add support for parametrized resource wantobjects in regrtests (GH-143570) (GH-143914) 2026-01-16 17:01:53 +00:00
test_simpledialog.py [3.13] gh-65784: Add support for parametrized resource wantobjects in regrtests (GH-143570) (GH-143914) 2026-01-16 17:01:53 +00:00
test_text.py [3.13] gh-151678: Add tests for tkinter.Text (GH-151681) (GH-151705) (GH-151715) 2026-06-19 09:28:36 +00:00
test_variables.py [3.13] gh-65784: Add support for parametrized resource wantobjects in regrtests (GH-143570) (GH-143914) 2026-01-16 17:01:53 +00:00
test_widgets.py [3.13] gh-151678: Add tests for tkinter.Canvas (GH-151683) (GH-151718) 2026-06-19 11:14:14 +00:00
widget_tests.py [3.13] gh-120873: Add tests for new widget options in Tk 8.7 (GH-120877) (GH-120879) 2024-06-22 13:43:30 +00: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).