summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pyrepl/test_pyrepl.py
diff options
context:
space:
mode:
authorSam Gross <colesbury@gmail.com>2024-07-15 22:50:16 (GMT)
committerGitHub <noreply@github.com>2024-07-15 22:50:16 (GMT)
commit4134261ab831863565fefc7a04d05a1fc1bca2f8 (patch)
tree0d9ae1a63ad1a3a5cb87fbed37700e3ea76a7ce9 /Lib/test/test_pyrepl/test_pyrepl.py
parente5c7216f376a06d2c931daf999e2980e494e747e (diff)
downloadcpython-4134261ab831863565fefc7a04d05a1fc1bca2f8.zip
cpython-4134261ab831863565fefc7a04d05a1fc1bca2f8.tar.gz
cpython-4134261ab831863565fefc7a04d05a1fc1bca2f8.tar.bz2
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.
Diffstat (limited to 'Lib/test/test_pyrepl/test_pyrepl.py')
-rw-r--r--Lib/test/test_pyrepl/test_pyrepl.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_pyrepl/test_pyrepl.py b/Lib/test/test_pyrepl/test_pyrepl.py
index 543a13e..2b1f8c3 100644
--- a/Lib/test/test_pyrepl/test_pyrepl.py
+++ b/Lib/test/test_pyrepl/test_pyrepl.py
@@ -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)