]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-104855: Update Tkinter tests for Tcl/Tk 8.7 and 9.0 (GH-120824) (GH-120865)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 22 Jun 2024 07:10:04 +0000 (09:10 +0200)
committerGitHub <noreply@github.com>
Sat, 22 Jun 2024 07:10:04 +0000 (07:10 +0000)
commitf1acb3a5927ef813381d40be6fec068a655ddb7a
tree6b06e32a93fc220e3c05800d64516d4cbd1b44a8
parenta57d917a48a74b462a896e502141a7bf7118d035
[3.12] gh-104855: Update Tkinter tests for Tcl/Tk 8.7 and 9.0 (GH-120824) (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>
Lib/test/test_tcl.py
Lib/test/test_tkinter/test_geometry_managers.py
Lib/test/test_tkinter/test_variables.py
Lib/test/test_tkinter/test_widgets.py
Lib/test/test_tkinter/widget_tests.py
Lib/test/test_ttk/test_widgets.py