summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_syntax.py
diff options
context:
space:
mode:
authorLysandros Nikolaou <lisandrosnik@gmail.com>2022-11-20 18:29:05 (GMT)
committerGitHub <noreply@github.com>2022-11-20 18:29:05 (GMT)
commit152a437b8dee77fe10f13f504da3ee63f1dd3657 (patch)
tree9164d6b84f9657cba22a2b649fa667d753d11f8a /Lib/test/test_syntax.py
parent56a517e9e854559e2f0c23c0e5adcaf846a2e0c3 (diff)
downloadcpython-152a437b8dee77fe10f13f504da3ee63f1dd3657.zip
cpython-152a437b8dee77fe10f13f504da3ee63f1dd3657.tar.gz
cpython-152a437b8dee77fe10f13f504da3ee63f1dd3657.tar.bz2
[3.11] gh-99211: Point to except/except* on syntax errors when mixing them (GH-99215) (GH-99622)
gh-99211: Point to except/except* on syntax errors when mixing them (GH-99215) (cherry picked from commit 9c4232ae8972a33f84e875cfdd866318a1233e47)
Diffstat (limited to 'Lib/test/test_syntax.py')
-rw-r--r--Lib/test/test_syntax.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py
index d72f41f..400092e 100644
--- a/Lib/test/test_syntax.py
+++ b/Lib/test/test_syntax.py
@@ -1988,12 +1988,12 @@ class SyntaxTestCase(unittest.TestCase):
def test_except_then_except_star(self):
self._check_error("try: pass\nexcept ValueError: pass\nexcept* TypeError: pass",
r"cannot have both 'except' and 'except\*' on the same 'try'",
- lineno=1, end_lineno=1, offset=1, end_offset=4)
+ lineno=3, end_lineno=3, offset=1, end_offset=8)
def test_except_star_then_except(self):
self._check_error("try: pass\nexcept* ValueError: pass\nexcept TypeError: pass",
r"cannot have both 'except' and 'except\*' on the same 'try'",
- lineno=1, end_lineno=1, offset=1, end_offset=4)
+ lineno=3, end_lineno=3, offset=1, end_offset=7)
def test_empty_line_after_linecont(self):
# See issue-40847