Skip to content

Commit

Permalink
doc: add versionadded to ExceptionInfo.group_contains
Browse files Browse the repository at this point in the history
  • Loading branch information
bastimeyer committed Mar 19, 2024
1 parent 532782a commit c9b5d82
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/_pytest/_code/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,8 @@ def group_contains(
If `None`, will search for a matching exception at any nesting depth.
If >= 1, will only match an exception if it's at the specified depth (depth = 1 being
the exceptions contained within the topmost exception group).
.. versionadded:: 8.0
"""
msg = "Captured exception is not an instance of `BaseExceptionGroup`"
assert isinstance(self.value, BaseExceptionGroup), msg
Expand Down

0 comments on commit c9b5d82

Please sign in to comment.