Skip to content

Commit f1b958f

Browse files
pablogsalSonicField
authored andcommitted
pythongh-111201: Use a more common constant in completion tests in test_pyrepl (python#118638)
1 parent e01dae6 commit f1b958f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Lib/test/test_pyrepl.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -578,13 +578,18 @@ def test_simple_completion(self):
578578
self.assertEqual(output, "os.getenv")
579579

580580
def test_completion_with_many_options(self):
581-
events = code_to_events("os.\t\tO_AS\t\n")
581+
# Test with something that initially displays many options
582+
# and then complete from one of them. The first time tab is
583+
# pressed, the options are displayed (which corresponds to
584+
# when the repl shows [ not unique ]) and the second completes
585+
# from one of them.
586+
events = code_to_events("os.\t\tO_AP\t\n")
582587

583588
namespace = {"os": os}
584589
reader = self.prepare_reader(events, namespace)
585590

586591
output = multiline_input(reader, namespace)
587-
self.assertEqual(output, "os.O_ASYNC")
592+
self.assertEqual(output, "os.O_APPEND")
588593

589594
def test_empty_namespace_completion(self):
590595
events = code_to_events("os.geten\t\n")

0 commit comments

Comments
 (0)