diff options
author | Batuhan Taskaya <batuhanosmantaskaya@gmail.com> | 2020-05-01 13:13:43 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-01 13:13:43 (GMT) |
commit | 76c1b4d5c5a610c09943e1ee7ae18f1957804730 (patch) | |
tree | eeaf4c2eb7b712817866ba49d04a5c57a3508795 /Lib/test/test_cmd_line_script.py | |
parent | 719e14d2837520c18398a3e22a36f20c1fe76edf (diff) | |
download | cpython-76c1b4d5c5a610c09943e1ee7ae18f1957804730.zip cpython-76c1b4d5c5a610c09943e1ee7ae18f1957804730.tar.gz cpython-76c1b4d5c5a610c09943e1ee7ae18f1957804730.tar.bz2 |
bpo-40334: Improve column offsets for thrown syntax errors by Pegen (GH-19782)
Diffstat (limited to 'Lib/test/test_cmd_line_script.py')
-rw-r--r-- | Lib/test/test_cmd_line_script.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_cmd_line_script.py b/Lib/test/test_cmd_line_script.py index f0130e3..1fc9500 100644 --- a/Lib/test/test_cmd_line_script.py +++ b/Lib/test/test_cmd_line_script.py @@ -599,7 +599,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 first 1 character - self.assertIn("\n 1 + 1 = 2\n ^", text) + self.assertIn("\n 1 + 1 = 2\n ^", text) def test_syntaxerror_indented_caret_position(self): script = textwrap.dedent("""\ @@ -611,7 +611,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 first 1 character - self.assertIn("\n 1 + 1 = 2\n ^", text) + self.assertIn("\n 1 + 1 = 2\n ^", text) # Try the same with a form feed at the start of the indented line script = ( @@ -622,7 +622,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 ^", text) + self.assertIn("\n 1 + 1 = 2\n ^", text) def test_syntaxerror_multi_line_fstring(self): script = 'foo = f"""{}\nfoo"""\n' |