Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-111201: Use a more common constant in completion tests in test_pyrepl #118638

Merged
merged 1 commit into from
May 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Lib/test/test_pyrepl.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,13 +578,18 @@ def test_simple_completion(self):
self.assertEqual(output, "os.getenv")

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

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

output = multiline_input(reader, namespace)
self.assertEqual(output, "os.O_ASYNC")
self.assertEqual(output, "os.O_APPEND")

def test_empty_namespace_completion(self):
events = code_to_events("os.geten\t\n")
Expand Down
Loading