Skip to content

Commit e4614b7

Browse files
committed
Signed-off-by: Terry Jan Reedy <tjreedy@udel.edu>
1 parent 5160ed0 commit e4614b7

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

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.assertFalse(any(x[0] == '_' for x in s))
242-
self.assertTrue(any(x[0] == '_' for x in 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']}):

0 commit comments

Comments
 (0)