gh-121605: Fix test hang when pyrepl is not available (GH-121820)

The fallback repl does not support "exit" without parentheses, so the
test would hang until the timeout expired.
This commit is contained in:
Sam Gross 2024-07-15 18:50:16 -04:00 committed by GitHub
parent e5c7216f37
commit 4134261ab8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -901,7 +901,7 @@ class TestMain(TestCase):
def test_exposed_globals_in_repl(self):
pre = "['__annotations__', '__builtins__'"
post = "'__loader__', '__name__', '__package__', '__spec__']"
output, exit_code = self.run_repl(["sorted(dir())", "exit"])
output, exit_code = self.run_repl(["sorted(dir())", "exit()"])
if "can't use pyrepl" in output:
self.skipTest("pyrepl not available")
self.assertEqual(exit_code, 0)