FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-155648: Fix IDLE tests that cannot fail by terryjreedy · Pull Request #156257 · python/cpython · GitHub

Repository navigation

gh-155648: Fix IDLE tests that cannot fail - #156257

Merged
terryjreedy merged 3 commits into
python:mainfrom
terryjreedy:ddbug26
Aug 24, 2026
Merged

terryjreedy merged 3 commits into
python:mainfrom
terryjreedy:ddbug26

Conversation

terryjreedy commented Aug 23, 2026 •
edited
Loading

Copy link
Copy Markdown
Member

DD bug 26:
test_autocomplete.py:241 passes when proper because any([]) is True is true. It would also pass if small only had underscored words because the filter got reversed. Change logic and replace filter with generator expression
using slice instead of startswith. Change line 242 to match.

test_editor.py:236 and test_configdialog.py:55 have empty tests ('pass'); skip them for now.
PR-#156260 add real tests.

template.py:25 tests True == True; skip it. With this, the bug scanner should be satisfied while allowing
setUpClass and tearDownClass to run and be verified.

DD bug 26:
test_autocomplete.py:241 passes when proper because `any([]) is
True` is true.  It would also pass if is small only had underscored
words because the filter got reversed.  Change logic and replace
filter with generator expressions.

test_editor.py:236 and test_configdialog.py:55 have empty tests
('pass'); comment them out.
template.py:25 tests `True == True`; make another comparison.
The template fix still might fail the bug scanner, but does not
matter.  It is not run, and might not be needed any longer.
Comment thread Lib/idlelib/idle_test/test_editor.py Outdated
Comment thread Lib/idlelib/idle_test/template.py Outdated

Copy link
Copy Markdown
Member

See #156260 which implements the tests instead of commenting them out.

Copy link
Copy Markdown
Member Author

I made a change in each file. Please re-review. I would like to merge this now as a minimal fix, and include 3.15 in the backports. I looked at the +300 lines of real tests and would like to defer them until 3.15 is unlocked.

Comment on lines 233 to 234

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

What is the difference between these lines...

terryjreedy merged commit ee1da7e into python:main Aug 24, 2026
52 checks passed

Copy link
Copy Markdown

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

bedevere-app Bot commented Aug 24, 2026

Copy link
Copy Markdown

GH-156315 is a backport of this pull request to the 3.15 branch.

bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Aug 24, 2026

bedevere-app Bot commented Aug 24, 2026

Copy link
Copy Markdown

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

bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Aug 24, 2026

bedevere-app Bot commented Aug 24, 2026

Copy link
Copy Markdown

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

bedevere-app Bot removed the needs backport to 3.13 only security fixes label Aug 24, 2026
terryjreedy deleted the ddbug26 branch August 24, 2026 14:25

Copy link
Copy Markdown
Member Author

Serhiy, thank you for review. Original patch 'worked'; reviewed result is better for each file changed.

terryjreedy added a commit that referenced this pull request Aug 24, 2026
gh-155648: Fix IDLE tests that cannot fail (GH-156257)

test_autocomplete.py:241 passes when proper because any([]) is True is true. It would also pass if small only had underscored words because the filter got reversed. Change logic and replace filter with generator expression
using slice instead of startswith. Change line 242 to match.

test_editor.py:236 and test_configdialog.py:55 have empty tests ('pass'); skip them for now.
PR-GH-156260 add real tests.

template.py:25 tests True == True; skip it. With this, the bug scanner should be satisfied while allowing
setUpClass and tearDownClass to run and be verified.

Remove duplicate and confusing fetch_completions call.
(cherry picked from commit ee1da7e)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
terryjreedy added a commit that referenced this pull request Aug 24, 2026
gh-155648: Fix IDLE tests that cannot fail (GH-156257)

test_autocomplete.py:241 passes when proper because any([]) is True is true. It would also pass if small only had underscored words because the filter got reversed. Change logic and replace filter with generator expression
using slice instead of startswith. Change line 242 to match.

test_editor.py:236 and test_configdialog.py:55 have empty tests ('pass'); skip them for now.
PR-GH-156260 add real tests.

template.py:25 tests True == True; skip it. With this, the bug scanner should be satisfied while allowing
setUpClass and tearDownClass to run and be verified.

Remove duplicate and confusing fetch_completions call.
(cherry picked from commit ee1da7e)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Aug 24, 2026
RMenuTest and ConfigDialogTest were skipped as empty in pythonGH-156257.
They are no longer empty.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

This comment was marked as off-topic.

This comment was marked as off-topic.

hugovk pushed a commit that referenced this pull request Aug 27, 2026
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
clin1234 pushed a commit to clin1234/cpython that referenced this pull request Aug 27, 2026
test_autocomplete.py:241 passes when proper because any([]) is True is true. It would also pass if small only had underscored words because the filter got reversed. Change logic and replace filter with generator expression
using slice instead of startswith. Change line 242 to match.

test_editor.py:236 and test_configdialog.py:55 have empty tests ('pass'); skip them for now.
PR-python#156260 add real tests.

template.py:25 tests True == True; skip it. With this, the bug scanner should be satisfied while allowing
setUpClass and tearDownClass to run and be verified.

Remove duplicate and confusing fetch_completions call.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

3 participants


Back | FazBrowse Home | New Git URL