Skip to content
This repository was archived by the owner on Jan 13, 2026. It is now read-only.

Commit 5d36d2e

Browse files
committed
Add test case for exception groups
1 parent 53b8330 commit 5d36d2e

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import pytest
2+
3+
from rewrite.test import rewrite_run, python
4+
5+
6+
# noinspection PyCompatibility
7+
@pytest.mark.xfail(reason="Exception groups are not yet supported", strict=True)
8+
def test_with_parentheses():
9+
# language=python
10+
rewrite_run(
11+
python(
12+
"""\
13+
try:
14+
foo()
15+
except* Exception:
16+
pass
17+
"""
18+
)
19+
)

rewrite/tox.ini

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py3.9, py3.12
2+
envlist = py3.9, py3.11, py3.12
33

44
[testenv]
55
deps =
@@ -14,6 +14,11 @@ basepython = python3.9
1414
commands =
1515
poetry run pytest tests/python/all
1616

17+
[testenv:py3.11]
18+
basepython = python3.11
19+
commands =
20+
poetry run pytest tests/python/all tests/python/py311
21+
1722
[testenv:py3.12]
1823
basepython = python3.12
1924
commands =

0 commit comments

Comments
 (0)