Skip to content

Commit 96ae61d

Browse files
[3.15] gh-155648: Fix IDLE tests that cannot fail (GH-156257) (#156315)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
1 parent 76ef766 commit 96ae61d

4 files changed

Lines changed: 10 additions & 9 deletions

File tree

Lib/idlelib/idle_test/template.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def tearDownClass(cls):
2121
cls.root.destroy()
2222
del cls.root
2323

24+
@unittest.skip('Dummy test')
2425
def test_init(self):
2526
self.assertTrue(True)
2627

Lib/idlelib/idle_test/test_autocomplete.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -230,16 +230,14 @@ def test_fetch_completions(self):
230230
# For file completion, a large list containing all files in the path,
231231
# and a small list containing files that do not start with '.'.
232232
acp = self.autocomplete
233-
small, large = acp.fetch_completions(
234-
'', ac.ATTRS)
235-
if hasattr(__main__, '__file__') and __main__.__file__ != ac.__file__:
236-
self.assertNotIn('AutoComplete', small) # See issue 36405.
237233

238-
# Test attributes
239-
s, b = acp.fetch_completions('', ac.ATTRS)
240-
self.assertLess(len(small), len(large))
241-
self.assertTrue(all(filter(lambda x: x.startswith('_'), s)))
242-
self.assertTrue(any(filter(lambda x: x.startswith('_'), b)))
234+
# Test current module (what='') attributes.
235+
small, large = acp.fetch_completions('', ac.ATTRS)
236+
if hasattr(__main__, '__file__') and __main__.__file__ != ac.__file__:
237+
self.assertNotIn('AutoComplete', small) # See gh-80586.
238+
self.assertLess(len(small), len(large)) # Not equal
239+
self.assertFalse(any(a[:1] == '_' for a in small))
240+
self.assertTrue(any(a[:1] == '_' for a in large))
243241

244242
# Test smalll should respect to __all__.
245243
with patch.dict('__main__.__dict__', {'__all__': ['a', 'b']}):

Lib/idlelib/idle_test/test_configdialog.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ def tearDownModule():
5050
root = dialog = None
5151

5252

53+
@unittest.skip('Empty tests')
5354
class ConfigDialogTest(unittest.TestCase):
5455

5556
def test_deactivate_current_config(self):

Lib/idlelib/idle_test/test_editor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ def test_searcher(self):
211211
self.assertEqual(actual_pair, expected_pair)
212212

213213

214+
@unittest.skip('Empty test')
214215
class RMenuTest(unittest.TestCase):
215216

216217
@classmethod

0 commit comments

Comments
 (0)