Skip to content

Commit a76aa6f

Browse files
[8.0.x] fix incorrect examples for group_contains (#11897)
Co-authored-by: John Litborn <[email protected]>
1 parent 73371a0 commit a76aa6f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/en/how-to/assert.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ method to test for exceptions returned as part of an :class:`ExceptionGroup`:
154154
.. code-block:: python
155155
156156
def test_exception_in_group():
157-
with pytest.raises(RuntimeError) as excinfo:
157+
with pytest.raises(ExceptionGroup) as excinfo:
158158
raise ExceptionGroup(
159159
"Group message",
160160
[
@@ -176,7 +176,7 @@ exception at a specific level; exceptions contained directly in the top
176176
.. code-block:: python
177177
178178
def test_exception_in_group_at_given_depth():
179-
with pytest.raises(RuntimeError) as excinfo:
179+
with pytest.raises(ExceptionGroup) as excinfo:
180180
raise ExceptionGroup(
181181
"Group message",
182182
[

0 commit comments

Comments
 (0)