File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments