Skip to content

[3.15] gh-153422: Assert bool return type in tkinter tests (GH-153429)#153439

Merged
serhiy-storchaka merged 1 commit into
python:3.15from
serhiy-storchaka:backport-153422-tests-3.15
Jul 9, 2026
Merged

[3.15] gh-153422: Assert bool return type in tkinter tests (GH-153429)#153439
serhiy-storchaka merged 1 commit into
python:3.15from
serhiy-storchaka:backport-153422-tests-3.15

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Jul 9, 2026

Copy link
Copy Markdown
Member

Partial backport of #153429 (gh-153422) to 3.15, without the behavior change: winfo_exists(), winfo_ismapped(), winfo_viewable() and Text.edit_modified() continue to return an integer on 3.15, so only the version-independent parts are backported.

The tests for PhotoImage.transparency_get(), Text.debug() and Treeview.exists() — which already return a bool on all versions — now assert the exact type with assertIs.

The documentation for the winfo_* methods and Text.edit_modified() uses general lowercase true/false instead of 1/0 (their return type is unchanged here), while Treeview.tag_has()'s docstring uses True/False, since it genuinely returns a bool.

🤖 Generated with Claude Code

…honGH-153429)

The tests for PhotoImage.transparency_get(), Text.debug() and
Treeview.exists() now assert the exact bool type, and the documentation
and docstrings use "true"/"false" instead of "1"/"0".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@serhiy-storchaka serhiy-storchaka added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes skip news labels Jul 9, 2026
@serhiy-storchaka serhiy-storchaka enabled auto-merge (squash) July 9, 2026 14:43
@serhiy-storchaka serhiy-storchaka merged commit 1604c80 into python:3.15 Jul 9, 2026
60 of 61 checks passed
@miss-islington-app

Copy link
Copy Markdown

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

@bedevere-app

bedevere-app Bot commented Jul 9, 2026

Copy link
Copy Markdown

GH-153442 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jul 9, 2026
@bedevere-app

bedevere-app Bot commented Jul 9, 2026

Copy link
Copy Markdown

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Jul 9, 2026
serhiy-storchaka added a commit that referenced this pull request Jul 9, 2026
GH-153439) (GH-153442)

The tests for PhotoImage.transparency_get(), Text.debug() and
Treeview.exists() now assert the exact bool type, and the documentation
and docstrings use "true"/"false" instead of "1"/"0".
(cherry picked from commit 1604c80)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
serhiy-storchaka added a commit that referenced this pull request Jul 10, 2026
GH-153439) (GH-153443)

The tests for PhotoImage.transparency_get(), Text.debug() and
Treeview.exists() now assert the exact bool type, and the documentation
and docstrings use "true"/"false" instead of "1"/"0".
(cherry picked from commit 1604c80)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant