diff --git a/src/_pytest/_code/code.py b/src/_pytest/_code/code.py index 12168be607..2e3c4ba64f 100644 --- a/src/_pytest/_code/code.py +++ b/src/_pytest/_code/code.py @@ -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