]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-117174: Adapt test_multiple_statements_fail_early now that we have always source...
authorPablo Galindo Salgado <Pablogsal@gmail.com>
Mon, 10 Mar 2025 23:10:53 +0000 (23:10 +0000)
committerGitHub <noreply@github.com>
Mon, 10 Mar 2025 23:10:53 +0000 (23:10 +0000)
Lib/test/test_repl.py

index 611fc89e57a9847f18b1cae9ef88685fd73f09e4..f68b0c1ba8642fcafd9b0de61a019fd9a3061593 100644 (file)
@@ -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("""\