https://github.com/python/cpython/commit/96ae61deca8c228cb5581a97beaa7c7034b463fd commit: 96ae61deca8c228cb5581a97beaa7c7034b463fd branch: 3.15 author: Miss Islington (bot) <[email protected]> committer: hugovk <[email protected]> date: 2026-08-27T13:47:50+03:00 summary:
[3.15] gh-155648: Fix IDLE tests that cannot fail (GH-156257) (#156315) Co-authored-by: Terry Jan Reedy <[email protected]> files: M Lib/idlelib/idle_test/template.py M Lib/idlelib/idle_test/test_autocomplete.py M Lib/idlelib/idle_test/test_configdialog.py M Lib/idlelib/idle_test/test_editor.py diff --git a/Lib/idlelib/idle_test/template.py b/Lib/idlelib/idle_test/template.py index 0a4bd8b8e981fc7..7c3df6ba8fbce38 100644 --- a/Lib/idlelib/idle_test/template.py +++ b/Lib/idlelib/idle_test/template.py @@ -21,6 +21,7 @@ def tearDownClass(cls): cls.root.destroy() del cls.root + @unittest.skip('Dummy test') def test_init(self): self.assertTrue(True) diff --git a/Lib/idlelib/idle_test/test_autocomplete.py b/Lib/idlelib/idle_test/test_autocomplete.py index a811363c18d04e5..88af3efc35bbd18 100644 --- a/Lib/idlelib/idle_test/test_autocomplete.py +++ b/Lib/idlelib/idle_test/test_autocomplete.py @@ -230,16 +230,14 @@ def test_fetch_completions(self): # For file completion, a large list containing all files in the path, # and a small list containing files that do not start with '.'. acp = self.autocomplete - small, large = acp.fetch_completions( - '', ac.ATTRS) - if hasattr(__main__, '__file__') and __main__.__file__ != ac.__file__: - self.assertNotIn('AutoComplete', small) # See issue 36405. - # Test attributes - s, b = acp.fetch_completions('', ac.ATTRS) - self.assertLess(len(small), len(large)) - self.assertTrue(all(filter(lambda x: x.startswith('_'), s))) - self.assertTrue(any(filter(lambda x: x.startswith('_'), b))) + # Test current module (what='') attributes. + small, large = acp.fetch_completions('', ac.ATTRS) + if hasattr(__main__, '__file__') and __main__.__file__ != ac.__file__: + self.assertNotIn('AutoComplete', small) # See gh-80586. + self.assertLess(len(small), len(large)) # Not equal + self.assertFalse(any(a[:1] == '_' for a in small)) + self.assertTrue(any(a[:1] == '_' for a in large)) # Test smalll should respect to __all__. with patch.dict('__main__.__dict__', {'__all__': ['a', 'b']}): diff --git a/Lib/idlelib/idle_test/test_configdialog.py b/Lib/idlelib/idle_test/test_configdialog.py index 696a3b2f8f1bc23..f3e1c785a92674c 100644 --- a/Lib/idlelib/idle_test/test_configdialog.py +++ b/Lib/idlelib/idle_test/test_configdialog.py @@ -50,6 +50,7 @@ def tearDownModule(): root = dialog = None [email protected]('Empty tests') class ConfigDialogTest(unittest.TestCase): def test_deactivate_current_config(self): diff --git a/Lib/idlelib/idle_test/test_editor.py b/Lib/idlelib/idle_test/test_editor.py index e28ee549f180aa0..1fcea4f1eb0d6a0 100644 --- a/Lib/idlelib/idle_test/test_editor.py +++ b/Lib/idlelib/idle_test/test_editor.py @@ -211,6 +211,7 @@ def test_searcher(self): self.assertEqual(actual_pair, expected_pair) [email protected]('Empty test') class RMenuTest(unittest.TestCase): @classmethod _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
