Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-104855: Update Tkinter tests for Tcl/Tk 8.7 and 9.0 #120824

Merged
merged 37 commits into from
Jun 22, 2024

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Jun 21, 2024

Helper methods like checkParam() now interpret the expected error message as a regular expression instead of a literal.

@serhiy-storchaka
Copy link
Member Author

Based on #105047, but much more advanced.

@serhiy-storchaka
Copy link
Member Author

This is chasing a moving target, because Tcl/Tk 8.7 and 9.0 are still in active development, but I'm going to merge these changes so that most tests are compatible with future Tcl/Tk versions. This will help to catch bugs in future beta versions of Tcl/Tk before the release.

This includes also some refactoring of the existing tests, to make them more flexible.

@serhiy-storchaka serhiy-storchaka merged commit 6ad26de into python:main Jun 22, 2024
31 checks passed
@miss-islington-app
Copy link

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

@serhiy-storchaka serhiy-storchaka deleted the tk90tests branch June 22, 2024 06:53
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 22, 2024
…H-120824)

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 6ad26de)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
@bedevere-app
Copy link

bedevere-app bot commented Jun 22, 2024

GH-120864 is a backport of this pull request to the 3.13 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 22, 2024
…H-120824)

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 6ad26de)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Jun 22, 2024
@bedevere-app
Copy link

bedevere-app bot commented Jun 22, 2024

GH-120865 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Jun 22, 2024
serhiy-storchaka added a commit that referenced this pull request Jun 22, 2024
) (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 6ad26de)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
serhiy-storchaka added a commit that referenced this pull request Jun 22, 2024
) (GH-120864)

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 6ad26de)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
mrahtz pushed a commit to mrahtz/cpython that referenced this pull request Jun 30, 2024
…H-120824)

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>
noahbkim pushed a commit to hudson-trading/cpython that referenced this pull request Jul 11, 2024
…H-120824)

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>
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
…H-120824)

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants