Skip to content

Commit

Permalink
[8.1.x] doc: add versionadded to ExceptionInfo.group_contains (#12142)
Browse files Browse the repository at this point in the history
Co-authored-by: Sebastian Meyer <mail@bastimeyer.de>
  • Loading branch information
github-actions[bot] and bastimeyer authored Mar 19, 2024
1 parent 83614e1 commit c5e3921
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 @@ -788,6 +788,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 c5e3921

Please sign in to comment.