https://github.com/python/cpython/commit/e460602705f3402d7b8ecf747e538e14b807879d
commit: e460602705f3402d7b8ecf747e538e14b807879d
branch: 3.13
author: Miss Islington (bot) <31488909+miss-isling...@users.noreply.github.com>
committer: Yhg1s <tho...@python.org>
date: 2025-03-28T15:39:13Z
summary:

[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 <pablog...@gmail.com>

files:
M Lib/test/test_repl.py

diff --git a/Lib/test/test_repl.py b/Lib/test/test_repl.py
index 1e4b48622b9383..228b326699e75f 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("""\

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: arch...@mail-archive.com

Reply via email to