-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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-107262: update Tkinter tests for 8.6.14 #119322
Conversation
@serhiy-storchaka could you please review? |
Hi @serhiy-storchaka, Would you mind taking a look? Let me know if you prefer to approach differently |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your PR. I will look at this closer after I build Tcl/Tk 8.6.14.
I think that it is worth to keep tests for older Tk versions, which can still be in use. For example:
self.checkParam(widget, 'padding', (5, 6, 7),
expected=(5, 6, 7) if patchlevel >= (8, 6, 14) else ('5', '6', '7'))
You should also run the tests after manually changing wantobjects = 1
to wantobjects = 0
in Lib/tkinter/__init__.py
(unfortunately there is not option to do this without manual modification of the sources) and ensure that they are still passed.
So the final code could look rather like:
self.checkParam(widget, 'padding', (5, 6, 7),
expected=('5', '6', '7') if self.wantobject or patchlevel < (8, 6, 14) else (5, 6, 7))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated tests, so they now pass with older Tcl/Tk.
@DBJim, thank you for your contribution. Maybe you're new to Git? I noticed that you made these changes in the |
Thanks @DBJim for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
) (cherry picked from commit 9732ed5) Co-authored-by: James De Bias <[email protected]> Co-authored-by: Serhiy Storchaka <[email protected]>
) (cherry picked from commit 9732ed5) Co-authored-by: James De Bias <[email protected]> Co-authored-by: Serhiy Storchaka <[email protected]>
GH-119806 is a backport of this pull request to the 3.13 branch. |
GH-119807 is a backport of this pull request to the 3.12 branch. |
…H-119806) (cherry picked from commit 9732ed5) Co-authored-by: James De Bias <[email protected]> Co-authored-by: Serhiy Storchaka <[email protected]>
…H-119807) (cherry picked from commit 9732ed5) Co-authored-by: James De Bias <[email protected]> Co-authored-by: Serhiy Storchaka <[email protected]>
) Co-authored-by: Serhiy Storchaka <[email protected]>
) Co-authored-by: Serhiy Storchaka <[email protected]>
Update test assertions to pass with the changed behavior in Tk 8.6.14.
These two assertions are now only tested when the fixed Tk version is used, and it now tests for the correct result.
The tests are now passing locally on windows 64 bit when built with 8.6.14, which I hope should allow #116145 to progress for Windows.
Since it only changes the tests, I think news can be skipped.