diff --git a/Lib/test/test_pyrepl/test_pyrepl.py b/Lib/test/test_pyrepl/test_pyrepl.py index 543a13e0e697a8..2b1f8c3cea42f9 100644 --- a/Lib/test/test_pyrepl/test_pyrepl.py +++ b/Lib/test/test_pyrepl/test_pyrepl.py @@ -901,7 +901,7 @@ def setUp(self): 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)