Skip to content

Commit

Permalink
doc: add versionadded to ExceptionInfo.group_contains (pytest-dev#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
bastimeyer authored and flying-sheep committed Apr 9, 2024
1 parent 246abfd commit 9f20311
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 9f20311

Please sign in to comment.