gh-111201: Support pyrepl on Windows (#119559)

Co-authored-by: Anthony Shaw <anthony.p.shaw@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
This commit is contained in:
Dino Viehland 2024-05-31 00:49:03 -07:00 committed by GitHub
parent 13a5fdc72f
commit 0d07182821
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 1020 additions and 49 deletions

View file

@ -508,14 +508,15 @@ def prepare_reader(self, events, namespace):
reader = ReadlineAlikeReader(console=console, config=config)
return reader
@patch("rlcompleter._readline_available", False)
def test_simple_completion(self):
events = code_to_events("os.geten\t\n")
events = code_to_events("os.getpid\t\n")
namespace = {"os": os}
reader = self.prepare_reader(events, namespace)
output = multiline_input(reader, namespace)
self.assertEqual(output, "os.getenv")
self.assertEqual(output, "os.getpid()")
def test_completion_with_many_options(self):
# Test with something that initially displays many options