Skip to content

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

Open
terryjreedy wants to merge 1 commit into
python:mainfrom
terryjreedy:ddbug26
Open

gh-155648: Fix IDLE tests that cannot fail#156257
terryjreedy wants to merge 1 commit into
python:mainfrom
terryjreedy:ddbug26

Conversation

@terryjreedy

@terryjreedy terryjreedy commented Aug 23, 2026

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 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.

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.
@terryjreedy terryjreedy added skip news topic-IDLE needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Aug 23, 2026
Comment on lines +241 to +242
self.assertFalse(any(x.startswith('_') for x in s))
self.assertTrue(any(x.startswith('_') for x in b))

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.

Isn't it the same?


def test_rclick(self):
pass
##class RMenuTest(unittest.TestCase):

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.

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)

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.

This is a template file. It is not executed.

@serhiy-storchaka

Copy link
Copy Markdown
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes skip news topic-IDLE

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants