File tree 1 file changed +20
-1
lines changed 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:
1732
1732
TypeError("NOT IN SUMMARY"),
1733
1733
]
1734
1734
)
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
+ )
1735
1749
"""
1736
1750
)
1751
+ # run with -vv to not truncate summary info, default width in tests is very low
1737
1752
result = pytester .runpytest ("-vv" )
1738
1753
assert result .ret == 1
1739
1754
backport_str = "exceptiongroup." if sys .version_info < (3 , 11 ) else ""
@@ -1756,7 +1771,11 @@ def test_multiple() -> None:
1756
1771
"FAILED test_exceptiongroup_short_summary_info.py::test_multiple - "
1757
1772
f"{ backport_str } ExceptionGroup: bbbbbbbbbb (2 sub-exceptions)"
1758
1773
),
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 *" ,
1760
1779
]
1761
1780
)
1762
1781
You can’t perform that action at this time.
0 commit comments