gh-117174: Adapt test_multiple_statements_fail_early now that we have always source (#131065)

This commit is contained in:
Pablo Galindo Salgado 2025-03-10 23:10:53 +00:00 committed by GitHub
parent 7c98b0674d
commit 4192ce17ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View 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("""\