mirror of
https://github.com/python/cpython.git
synced 2025-07-23 19:25:40 +00:00
[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 9c4232ae89
)
This commit is contained in:
parent
56a517e9e8
commit
152a437b8d
3 changed files with 1018 additions and 974 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue