summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pyrepl.py
diff options
context:
space:
mode:
authorPablo Galindo Salgado <Pablogsal@gmail.com>2024-05-06 10:56:47 (GMT)
committerGitHub <noreply@github.com>2024-05-06 10:56:47 (GMT)
commitd3c7821335f88d92297622ad1ec17b33b9baf5cd (patch)
tree10f5c46f21feb517efb9fb5554b39d3593ae6fae /Lib/test/test_pyrepl.py
parentafbe5bf9c8c621bb19833a06e296245c41f0dbc5 (diff)
downloadcpython-d3c7821335f88d92297622ad1ec17b33b9baf5cd.zip
cpython-d3c7821335f88d92297622ad1ec17b33b9baf5cd.tar.gz
cpython-d3c7821335f88d92297622ad1ec17b33b9baf5cd.tar.bz2
gh-111201: Use a more common constant in completion tests in test_pyrepl (#118638)
Diffstat (limited to 'Lib/test/test_pyrepl.py')
-rw-r--r--Lib/test/test_pyrepl.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/Lib/test/test_pyrepl.py b/Lib/test/test_pyrepl.py
index 3cba37c..2b217ab 100644
--- a/Lib/test/test_pyrepl.py
+++ b/Lib/test/test_pyrepl.py
@@ -578,13 +578,18 @@ class TestPyReplCompleter(TestCase):
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")