From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Fri, 28 Mar 2025 15:39:13 +0000 (+0100) Subject: [3.13] gh-117174: Adapt test_multiple_statements_fail_early now that we have always... X-Git-Tag: v3.13.3~69 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e460602705f3402d7b8ecf747e538e14b807879d;p=thirdparty%2FPython%2Fcpython.git [3.13] gh-117174: Adapt test_multiple_statements_fail_early now that we have always source (GH-131065) (#131850) gh-117174: Adapt test_multiple_statements_fail_early now that we have always source (GH-131065) (cherry picked from commit 4192ce17ba643e5b0bc9d2182a429002e4cc9dfe) Co-authored-by: Pablo Galindo Salgado --- diff --git a/Lib/test/test_repl.py b/Lib/test/test_repl.py index 1e4b48622b93..228b326699e7 100644 --- a/Lib/test/test_repl.py +++ b/Lib/test/test_repl.py @@ -296,12 +296,12 @@ class TestInteractiveModeSyntaxErrors(unittest.TestCase): 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("""\