summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_tkinter
Commit message (Collapse)AuthorAgeFilesLines
* [3.12] gh-119614: Fix truncation of strings with embedded null characters in ↵Miss Islington (bot)2024-06-241-0/+9
| | | | | | | | | Tkinter (GH-120909) (GH-120939) Now the null character is always represented as \xc0\x80 for Tcl_NewStringObj(). (cherry picked from commit c38e2f64d012929168dfef7363c9e48bd1a6c731) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-120873: Add tests for new widget options in Tk 8.7 (GH-120877) ↵Miss Islington (bot)2024-06-222-15/+46
| | | | | | | (GH-120880) (cherry picked from commit a046c848c1df0cf98092e9696594d3fb836e3530) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-104855: Update Tkinter tests for Tcl/Tk 8.7 and 9.0 (GH-120824) ↵Miss Islington (bot)2024-06-224-116/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | (GH-120865) The tests are now passed with the current version of Tcl/Tk under development (8.7b1+ and 9.0b3+). The following changes were also made to make the tests more flexible: * Helper methods like checkParam() now interpret the expected error message as a regular expression instead of a literal. * Add support of new arguments in checkEnumParam(): - allow_empty=True skips testing with empty string; - fullname= specifies the name for error message if it differs from the option name; - sort=True sorts values for error message. * Add support of the allow_empty argument in checkReliefParam(): allow_empty=True adds an empty string to the list of accepted values. * Attributes _clip_highlightthickness, _clip_pad and _clip_borderwidth specify how negative values of options -highlightthickness, -padx, -pady and -borderwidth are handled. * Use global variables for some common error messages. (cherry picked from commit 6ad26de6e8ab61b035e7ecfff9791c2b349c3ad0) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* [3.12] gh-107262: Update Tkinter tests for Tcl/Tk 8.6.14 (GH-119322) (GH-119807)Miss Islington (bot)2024-05-301-4/+10
| | | | | | (cherry picked from commit 9732ed5ca94cd8fe9ca2fc7ba5a42dfa2b7791ea) Co-authored-by: James De Bias <81095953+DBJim@users.noreply.github.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] Add Tkinter tests for different events (GH-118778) (GH-119095)Serhiy Storchaka2024-05-161-0/+278
| | | (cherry picked from commit b6839942a8906fccdd64e749abeefe8a61ce7e03)
* [3.12] gh-113951: Tkinter: "tag_unbind(tag, sequence, funcid)" now only ↵Miss Islington (bot)2024-02-041-0/+95
| | | | | | | | | | | | | | unbinds "funcid" (GH-113955) (GH-114997) Previously, "tag_unbind(tag, sequence, funcid)" methods of Text and Canvas widgets destroyed the current binding for "sequence", leaving "sequence" unbound, and deleted the "funcid" command. Now they remove only "funcid" from the binding for "sequence", keeping other commands, and delete the "funcid" command. They leave "sequence" unbound only if "funcid" was the last bound command. (cherry picked from commit 7e42fddf608337e83b30401910d76fd75d5cf20a) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-113877: Fix Tkinter method winfo_pathname() on 64-bit Windows ↵Miss Islington (bot)2024-01-101-0/+12
| | | | | | | | | | (GH-113900) (GH-113901) winfo_id() converts the result of "winfo id" command to integer, but "winfo pathname" command requires an argument to be a hexadecimal number on Win64. (cherry picked from commit 1b7e0024a16c1820f61c04a8a100498568410afd) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-75666: Tkinter: "unbind(sequence, funcid)" now only unbinds ↵Miss Islington (bot)2023-12-061-7/+27
| | | | | | | | | | | | | | | | "funcid" (GH-111322) (GH-112802) Previously, "widget.unbind(sequence, funcid)" destroyed the current binding for "sequence", leaving "sequence" unbound, and deleted the "funcid" command. Now it removes only "funcid" from the binding for "sequence", keeping other commands, and deletes the "funcid" command. It leaves "sequence" unbound only if "funcid" was the last bound command. (cherry picked from commit cc7e45cc572dd818412a649970fdee579417701f) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: GiovanniL <13402461+GiovaLomba@users.noreply.github.com>
* [3.12] gh-75666: Tkinter: add tests for binding (GH-111202) (GH-111255)Miss Islington (bot)2023-10-241-0/+307
| | | | | (cherry picked from commit 9bb202a1a90ef0edce20c495c9426d9766df11bb) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-107705: Fix file leak in test_tkinter in the C locale (GH-110507) ↵Miss Islington (bot)2023-10-141-5/+10
| | | | | | | (GH-110857) (cherry picked from commit ca0f3d858d069231ce7c5b382790a774f385b467) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-104496: Use correct Tcl or Tk version in Tkinter tests (GH-107688) ↵Miss Islington (bot)2023-08-164-23/+23
| | | | | | | | | | (#107709) gh-104496: Use correct Tcl or Tk version in Tkinter tests (GH-107688) In future Tcl and Tk versions can be desynchronized. (cherry picked from commit 3c8e8f3ceeae08fc43d885f5a4c65a3ee4b1a2c8) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-100814: Fix exception for invalid callable value of Tkinter image ↵Miss Islington (bot)2023-08-161-0/+16
| | | | | | | | | | | option (GH-107692) (#107722) gh-100814: Fix exception for invalid callable value of Tkinter image option (GH-107692) Passing a callable object as an option value to a Tkinter image now raises the expected TclError instead of an AttributeError. (cherry picked from commit 50e3cc9748eb2103eb7ed6cc5a74d177df3cfb13) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-105077: Fix test_tkinter refleak checking (GH-105078) (GH-105079)Miss Islington (bot)2023-05-301-5/+10
| | | | | Use specific symbols from `test.support` to avoid having `support` overwritten by `test_tkinter`'s own `support` submodule. (cherry picked from commit 5454db4ace66018179f034fbffcea8d791d66a98)
* [3.12] gh-104497: Make tkinter test pass with tk 8.7 (GH-104789) (#105028)Miss Islington (bot)2023-05-271-1/+4
| | | | | | | | | | For test_widgets.MenuTest.test_configure_type, the options in the error message change to alphabetical order. --------- (cherry picked from commit 897e716d03d559a10dd5015ecb501ceb98955f3a) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-94473: Flatten arguments in tkinter.Canvas.coords() (GH-98479)Serhiy Storchaka2023-05-221-0/+6
| | | | | It now accepts not only "x1, y1, x2, y2, ..." and "[x1, y1, x2, y2, ...]", but also "(x1, y1), (x2, y2), ..." and "[(x1, y1), (x2, y2), ...]".
* gh-104461: Run tkinter test_configure_screen on X11 only (GH-104462)Christopher Chavez2023-05-161-0/+2
|
* gh-104494: Update certain Tkinter pack/place tests for Tk 8.7 errors (#104495)Christopher Chavez2023-05-151-4/+6
| | | | Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-103685: Fix tkinter.Menu.index() for Tk 8.7 (#103686)Christopher Chavez2023-04-241-0/+5
| | | | | | --------- Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* gh-102515: Remove unused imports in the `Lib/` directory (#102516)Alex Waygood2023-03-081-2/+1
|
* Add more tkinter.Canvas tests (GH-98475)Serhiy Storchaka2022-10-201-0/+158
| | | | It is a prerequisite for #94473. Add tests for the coords() method and for creation of some Canvas items.
* gh-97928: Fix handling options starting with "-" in tkinter.Text.count() ↵Serhiy Storchaka2022-10-191-3/+1
| | | | | (GH-98436) Previously they were silently ignored. Now they are errors.
* gh-97928: Add tests for tkinter.Text.count() (GH-98269)Serhiy Storchaka2022-10-191-0/+54
|
* gh-73588: Fix generation of the default name of tkinter.Checkbutton. (GH-97547)Serhiy Storchaka2022-09-271-0/+26
| | | | | | Previously, checkbuttons in different parent widgets could have the same short name and share the same state if arguments "name" and "variable" are not specified. Now they are globally unique.
* gh-54781: Move Lib/tkinter/test/test_ttk/ to Lib/test/test_ttk/ (#94070)Victor Stinner2022-06-2216-0/+4426
* Move Lib/tkinter/test/test_tkinter/ to Lib/test/test_tkinter/. * Move Lib/tkinter/test/test_ttk/ to Lib/test/test_ttk/. * Add Lib/test/test_ttk/__init__.py based on test_ttk_guionly.py. * Add Lib/test/test_tkinter/__init__.py * Remove old Lib/test/test_tk.py. * Remove old Lib/test/test_ttk_guionly.py. * Add __main__ sub-modules. * Update imports and update references to rename files.