Skip to content

Commit 033120b

Browse files
committed
add test case for codecov
1 parent 3311c18 commit 033120b

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

testing/code/test_excinfo.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1732,8 +1732,23 @@ def test_multiple() -> None:
17321732
TypeError("NOT IN SUMMARY"),
17331733
]
17341734
)
1735+
1736+
def test_nested_multiple() -> None:
1737+
raise ExceptionGroup(
1738+
"b" * 10,
1739+
[
1740+
ExceptionGroup(
1741+
"c" * 10,
1742+
[
1743+
ValueError("NOT IN SUMMARY"),
1744+
TypeError("NOT IN SUMMARY"),
1745+
]
1746+
)
1747+
]
1748+
)
17351749
"""
17361750
)
1751+
# run with -vv to not truncate summary info, default width in tests is very low
17371752
result = pytester.runpytest("-vv")
17381753
assert result.ret == 1
17391754
backport_str = "exceptiongroup." if sys.version_info < (3, 11) else ""
@@ -1756,7 +1771,11 @@ def test_multiple() -> None:
17561771
"FAILED test_exceptiongroup_short_summary_info.py::test_multiple - "
17571772
f"{backport_str}ExceptionGroup: bbbbbbbbbb (2 sub-exceptions)"
17581773
),
1759-
"*= 4 failed in *",
1774+
(
1775+
"FAILED test_exceptiongroup_short_summary_info.py::test_nested_multiple - "
1776+
f"{backport_str}ExceptionGroup: bbbbbbbbbb (1 sub-exception)"
1777+
),
1778+
"*= 5 failed in *",
17601779
]
17611780
)
17621781

0 commit comments

Comments
 (0)