{{ message }}
gh-155648: Fix IDLE tests that cannot fail - #156257
Merged
Merged
Conversation
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.
Member
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
Member
There was a problem hiding this comment.
What is the difference between these lines...
serhiy-storchaka
approved these changes
Aug 23, 2026
|
Thanks @terryjreedy for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15. |
|
GH-156315 is a backport of this pull request to the 3.15 branch. |
|
GH-156316 is a backport of this pull request to the 3.14 branch. |
|
GH-156317 is a backport of this pull request to the 3.13 branch. |
Member
Author
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.
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
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

DD bug 26:
test_autocomplete.py:241 passes when proper because
any([]) is Trueis true. It would also pass if small only had underscored words because the filter got reversed. Change logic and replace filter with generator expressionusing 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 allowingsetUpClass and tearDownClass to run and be verified.