Skip to content

Commit 76e32a3

Browse files
committed
test(test_rlcompleter): remove unintended test_enum_member_completion in rlcompleter tests
1 parent 14bd61e commit 76e32a3

1 file changed

Lines changed: 0 additions & 35 deletions

File tree

Lib/test/test_rlcompleter.py

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -160,41 +160,6 @@ class Foo:
160160
completer = rlcompleter.Completer(dict(f=Foo()))
161161
self.assertEqual(completer.complete('f.', 0), 'f.bar')
162162

163-
def test_enum_member_completion(self):
164-
"""Test that Enum members don't show non-existent attributes"""
165-
from enum import Enum
166-
167-
class Color(Enum):
168-
RED = 1
169-
GREEN = 2
170-
BLUE = 3
171-
172-
completer = rlcompleter.Completer()
173-
174-
# Test using complete method
175-
i = 0
176-
all_matches = []
177-
while True:
178-
match = completer.complete('Color.RED.__', i)
179-
if match is None:
180-
break
181-
all_matches.append(match)
182-
i += 1
183-
184-
# If no matches found, skip the test (environment issue)
185-
if not all_matches:
186-
self.skipTest("No matches found in test environment")
187-
188-
# These should NOT be in the matches
189-
self.assertNotIn('Color.RED.__name__', all_matches)
190-
self.assertNotIn('Color.RED.__qualname__', all_matches)
191-
self.assertNotIn('Color.RED.__members__', all_matches)
192-
self.assertNotIn('Color.RED.__abstractmethods__', all_matches)
193-
194-
# But these should be in the matches (they exist on the instance)
195-
self.assertIn('Color.RED.__class__', all_matches)
196-
self.assertIn('Color.RED.__doc__', all_matches)
197-
self.assertIn('Color.RED.__eq__', all_matches)
198163

199164
@unittest.mock.patch('rlcompleter._readline_available', False)
200165
def test_complete(self):

0 commit comments

Comments
 (0)