mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-99211: Point to except/except* on syntax errors when mixing them (GH-99215)
Automerge-Triggered-By: GH:lysnikolaou
This commit is contained in:
parent
b0e1f9c241
commit
9c4232ae89
3 changed files with 1018 additions and 974 deletions
|
@ -2017,12 +2017,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