From d3b8b4eabcce33d25fd0b168ab01f9b1c42a259c Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Mon, 10 Mar 2025 22:46:11 +0000 Subject: [PATCH] gh-117174: Adapt test_multiple_statements_fail_early now that we have always source --- Lib/test/test_repl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_repl.py b/Lib/test/test_repl.py index 611fc89e57a984..f68b0c1ba8642f 100644 --- a/Lib/test/test_repl.py +++ b/Lib/test/test_repl.py @@ -296,12 +296,12 @@ def f(): class TestAsyncioREPL(unittest.TestCase): def test_multiple_statements_fail_early(self): - user_input = "1 / 0; print('afterwards')" + user_input = "1 / 0; print(f'afterwards: {1+1}')" p = spawn_repl("-m", "asyncio") p.stdin.write(user_input) output = kill_python(p) self.assertIn("ZeroDivisionError", output) - self.assertNotIn("afterwards", output) + self.assertNotIn("afterwards: 2", output) def test_toplevel_contextvars_sync(self): user_input = dedent("""\