aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_tkinter
Commit message (Collapse)AuthorAge
* gh-130482: Add ability to specify name for tkinter.OptionMenu and ↵Zhikang Yan33 hours
| | | | tkinter.ttk.OptionMenu (GH-130502)
* gh-120220: Deprecate legacy methods for tracing variables in Tkinter (GH-120223)Serhiy Storchaka4 days
| | | | | They do not work with Tcl 9.0. Use new methods added in Python 3.6.
* gh-128562: Fix generation of the tkinter widget names (GH-128604)Zhikang Yan2025-01-13
| | | | There were possible conflicts if the widget class name ends with a digit.
* gh-128014: Fix passing default='' to the tkinter method wm_iconbitmap() ↵Zhikang Yan2025-01-02
| | | | | (GH-128015) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-126899: Add `**kw` to `tkinter.Misc.after` and `tkinter.Misc.after_idle` ↵Zhikang Yan2024-12-01
| | | | | | | (#126900) --------- Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-124111: Update tkinter for compatibility with Tcl/Tk 9.0.0 (GH-124156)Marc Culler2024-11-14
|
* gh-119614: Fix truncation of strings with embedded null characters in ↵Serhiy Storchaka2024-06-24
| | | | | | | Tkinter (GH-120909) Now the null character is always represented as \xc0\x80 for Tcl_NewStringObj().
* gh-120873: Add tests for new widget options in Tk 8.7 (GH-120877)Serhiy Storchaka2024-06-22
|
* gh-104855: Update Tkinter tests for Tcl/Tk 8.7 and 9.0 (GH-120824)Serhiy Storchaka2024-06-22
| | | | | | | | | | | | | | | | | | | | | | 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. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* gh-107262: Update Tkinter tests for Tcl/Tk 8.6.14 (GH-119322)James De Bias2024-05-30
| | | Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-119791: Fix new Tkinter tests for wantobjects=0 (GH-119792)Serhiy Storchaka2024-05-30
| | | | PhotoImage.get() retruns a string instead of a 3-tuple of integers in this case.
* Add Tkinter tests for different events (GH-118778)Serhiy Storchaka2024-05-16
|
* gh-118271: Support more options for reading/writing images in Tkinter ↵Serhiy Storchaka2024-05-06
| | | | | | | | (GH-118273) * Add PhotoImage.read() to read an image from a file. * Add PhotoImage.data() to get the image data. * Add background and grayscale parameters to PhotoImage.write().
* gh-118225: Support more options for copying images in Tkinter (GH-118228)Serhiy Storchaka2024-05-06
| | | | | | | | * Add the PhotoImage method copy_replace() to copy a region from one image to other image, possibly with pixel zooming and/or subsampling. * Add from_coords parameter to PhotoImage methods copy(), zoom() and subsample(). * Add zoom and subsample parameters to PhotoImage method copy().
* bpo-32839: Add the after_info() method for Tkinter widgets (GH-5664)Cheryl Sabella2024-04-27
|
* Remove tests_gui variables from Tkinter tests (GH-118280)Serhiy Storchaka2024-04-25
| | | | They were only used in runtktests.py which was removed in f59ed3c310a7ceebf2a56a84ea969a7f75d95b64 (bpo-45229).
* gh-97928: Partially restore the behavior of tkinter.Text.count() by default ↵Serhiy Storchaka2024-02-11
| | | | | | | | | | | | | (GH-115031) By default, it preserves an inconsistent behavior of older Python versions: packs the count into a 1-tuple if only one or none options are specified (including 'update'), returns None instead of 0. Except that setting wantobjects to 0 no longer affects the result. Add a new parameter return_ints: specifying return_ints=True makes Text.count() always returning the single count as an integer instead of a 1-tuple or None.
* gh-43457: Tkinter: fix design flaws in wm_attributes() (GH-111404)Serhiy Storchaka2024-02-05
| | | | | | | | | * When called with a single argument to get a value, it allow to omit the minus prefix. * It can be called with keyword arguments to set attributes. * w.wm_attributes(return_python_dict=True) returns a dict instead of a tuple (it will be the default in future). * Setting wantobjects to 0 no longer affects the result.
* gh-113951: Tkinter: "tag_unbind(tag, sequence, funcid)" now only unbinds ↵Serhiy Storchaka2024-02-04
| | | | | | | | | | | "funcid" (GH-113955) 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.
* gh-113877: Fix Tkinter method winfo_pathname() on 64-bit Windows (GH-113900)Serhiy Storchaka2024-01-10
| | | | | 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.
* gh-75666: Tkinter: "unbind(sequence, funcid)" now only unbinds "funcid" ↵Serhiy Storchaka2023-12-06
| | | | | | | | | | | | | (GH-111322) 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. Co-authored-by: GiovanniL <13402461+GiovaLomba@users.noreply.github.com>
* gh-75666: Tkinter: add tests for binding (GH-111202)Serhiy Storchaka2023-10-24
|
* gh-97928: Change the behavior of tkinter.Text.count() (GH-98484)Serhiy Storchaka2023-10-24
| | | | | | | It now always returns an integer if one or less counting options are specified. Previously it could return a single count as a 1-tuple, an integer (only if option "update" was specified) or None if no items found. The result is now the same if wantobjects is set to 0.
* gh-107705: Fix file leak in test_tkinter in the C locale (GH-110507)Serhiy Storchaka2023-10-14
|
* gh-109653: Remove unused imports in the `Lib/` directory (#109803)Alex Waygood2023-09-24
|
* gh-90791: Enable test___all__ on ASAN build (#108286)Victor Stinner2023-08-22
| | | | | | | * Only skip modules and tests related to X11 on ASAN builds: run other tests with ASAN. * Use print(flush=True) to see output earlier when it's redirected to a pipe. * Update issue reference: replace bpo-46633 with gh-90791.
* gh-72684: Tkinter: provide interface for "tk busy" subcommands (GH-107684)Serhiy Storchaka2023-08-19
| | | | Add tkinter.Misc methods: tk_busy_hold(), tk_busy_configure(), tk_busy_cget(), tk_busy_forget(), tk_busy_current(), and tk_busy_status().
* gh-100814: Fix exception for invalid callable value of Tkinter image option ↵Serhiy Storchaka2023-08-07
| | | | | | | (GH-107692) Passing a callable object as an option value to a Tkinter image now raises the expected TclError instead of an AttributeError.
* gh-104496: Use correct Tcl or Tk version in Tkinter tests (GH-107688)Serhiy Storchaka2023-08-07
| | | In future Tcl and Tk versions can be desynchronized.
* gh-105077: Fix test_tkinter refleak checking (GH-105078)Zachary Ware2023-05-30
| | | | Use specific symbols from `test.support` to avoid having `support` overwritten by `test_tkinter`'s own `support` submodule.
* gh-104497: Make tkinter test pass with tk 8.7 (#104789)Terry Jan Reedy2023-05-27
| | | | | | | | | | | | | | * gh-104497: Make tkinter test pass with tk 8.7 For test_widgets.MenuTest.test_configure_type, the options in the error message change to alphabetical order. * Update Lib/test/test_tkinter/test_widgets.py Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> --------- Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-104773: PEP 594: Remove the imghdr module (#104777)Victor Stinner2023-05-26
| | | | | | * Remove the Lib/test/imghdrdata/ directory. * Copy 5 pictures (gif, png, ppm, pgm, xbm) from removed Lib/test/imghdrdata/ to a new Lib/test/tkinterdata/ directory. * Update Sphinx from 4.5 to 6.2 in Doc/requirements.txt.
* gh-94473: Flatten arguments in tkinter.Canvas.coords() (GH-98479)Serhiy Storchaka2023-05-22
| | | | | 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-15
|
* gh-104494: Update certain Tkinter pack/place tests for Tk 8.7 errors (#104495)Christopher Chavez2023-05-15
| | | | 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-23
| | | | | | --------- 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-08
|
* Add more tkinter.Canvas tests (GH-98475)Serhiy Storchaka2022-10-20
| | | | 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-19
| | | | | (GH-98436) Previously they were silently ignored. Now they are errors.
* gh-97928: Add tests for tkinter.Text.count() (GH-98269)Serhiy Storchaka2022-10-19
|
* gh-73588: Fix generation of the default name of tkinter.Checkbutton. (GH-97547)Serhiy Storchaka2022-09-27
| | | | | | 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-22
* 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.