aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_cmd_line_script.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_cmd_line_script.py')
-rw-r--r--Lib/test/test_cmd_line_script.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_cmd_line_script.py b/Lib/test/test_cmd_line_script.py
index 2e0b5f72c22..af29c171d42 100644
--- a/Lib/test/test_cmd_line_script.py
+++ b/Lib/test/test_cmd_line_script.py
@@ -601,7 +601,7 @@ class CmdLineTest(unittest.TestCase):
exitcode, stdout, stderr = assert_python_failure(script_name)
text = io.TextIOWrapper(io.BytesIO(stderr), 'ascii').read()
# Confirm that the caret is located under the '=' sign
- self.assertIn("\n 1 + 1 = 2\n ^\n", text)
+ self.assertIn("\n ^^^^^\n", text)
def test_syntaxerror_indented_caret_position(self):
script = textwrap.dedent("""\
@@ -612,8 +612,8 @@ class CmdLineTest(unittest.TestCase):
script_name = _make_test_script(script_dir, 'script', script)
exitcode, stdout, stderr = assert_python_failure(script_name)
text = io.TextIOWrapper(io.BytesIO(stderr), 'ascii').read()
- # Confirm that the caret is located under the first 1 character
- self.assertIn("\n 1 + 1 = 2\n ^\n", text)
+ # Confirm that the caret starts under the first 1 character
+ self.assertIn("\n 1 + 1 = 2\n ^^^^^\n", text)
# Try the same with a form feed at the start of the indented line
script = (
@@ -624,7 +624,7 @@ class CmdLineTest(unittest.TestCase):
exitcode, stdout, stderr = assert_python_failure(script_name)
text = io.TextIOWrapper(io.BytesIO(stderr), "ascii").read()
self.assertNotIn("\f", text)
- self.assertIn("\n 1 + 1 = 2\n ^\n", text)
+ self.assertIn("\n 1 + 1 = 2\n ^^^^^\n", text)
def test_syntaxerror_multi_line_fstring(self):
script = 'foo = f"""{}\nfoo"""\n'
@@ -650,7 +650,7 @@ class CmdLineTest(unittest.TestCase):
self.assertEqual(
stderr.splitlines()[-3:],
[ b' foo = """\\q"""',
- b' ^',
+ b' ^^^^^^^^',
b'SyntaxError: invalid escape sequence \\q'
],
)