gh-155648: Fix IDLE tests that cannot fail - #156257
Open
terryjreedy wants to merge 1 commit into
Open
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.
Comment on lines
+241
to
+242
| self.assertFalse(any(x.startswith('_') for x in s)) | ||
| self.assertTrue(any(x.startswith('_') for x in b)) |
|
|
||
| def test_rclick(self): | ||
| pass | ||
| ##class RMenuTest(unittest.TestCase): |
Member
There was a problem hiding this comment.
It will be a pain to uncomment it all beck when real tests will be added. If you want to make the skip more explicit, you can use @unittest.skip().
|
|
||
| def test_init(self): | ||
| self.assertTrue(True) | ||
| self.assertTrue(self) |
Member
There was a problem hiding this comment.
This is a template file. It is not executed.
Member
|
See #156260 which implements the tests instead of commenting them out. |
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 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.