@@ -179,7 +179,7 @@ class RaisesExc(AbstractRaises[BaseExcT_co_default]):
179179 """
180180 .. versionadded:: 8.4
181181
182- Helper class to be used together with RaisesGroups when you want to specify requirements on sub-exceptions.
182+ Helper class to be used together with RaisesGroup when you want to specify requirements on sub-exceptions.
183183
184184 You don't need this if you only want to specify the type, since :class:`RaisesGroup`
185185 accepts ``type[BaseException]``.
@@ -191,11 +191,11 @@ class RaisesExc(AbstractRaises[BaseExcT_co_default]):
191191
192192 Examples::
193193
194- with RaisesGroups (RaisesExc(ValueError, match="string"))
194+ with RaisesGroup (RaisesExc(ValueError, match="string"))
195195 ...
196- with RaisesGroups (RaisesExc(check=lambda x: x.args == (3, "hello"))):
196+ with RaisesGroup (RaisesExc(check=lambda x: x.args == (3, "hello"))):
197197 ...
198- with RaisesGroups (RaisesExc(check=lambda x: type(x) is ValueError)):
198+ with RaisesGroup (RaisesExc(check=lambda x: type(x) is ValueError)):
199199 ...
200200 """
201201
@@ -323,33 +323,33 @@ class RaisesGroup(AbstractRaises[BaseExceptionGroup[BaseExcT_co]]):
323323 extracting all exceptions inside any nested :exc:`ExceptionGroup`, before matching.
324324
325325 It does not care about the order of the exceptions, so
326- ``RaisesGroups (ValueError, TypeError)``
326+ ``RaisesGroup (ValueError, TypeError)``
327327 is equivalent to
328- ``RaisesGroups (TypeError, ValueError)``.
328+ ``RaisesGroup (TypeError, ValueError)``.
329329
330330 Examples::
331331
332- with RaisesGroups (ValueError):
332+ with RaisesGroup (ValueError):
333333 raise ExceptionGroup("", (ValueError(),))
334- with RaisesGroups (
334+ with RaisesGroup (
335335 ValueError, ValueError, RaisesExc(TypeError, match="expected int")
336336 ):
337337 ...
338- with RaisesGroups (
338+ with RaisesGroup (
339339 KeyboardInterrupt,
340340 match="hello",
341341 check=lambda x: type(x) is BaseExceptionGroup,
342342 ):
343343 ...
344- with RaisesGroups(RaisesGroups (ValueError)):
344+ with RaisesGroup(RaisesGroup (ValueError)):
345345 raise ExceptionGroup("", (ExceptionGroup("", (ValueError(),)),))
346346
347347 # flatten_subgroups
348- with RaisesGroups (ValueError, flatten_subgroups=True):
348+ with RaisesGroup (ValueError, flatten_subgroups=True):
349349 raise ExceptionGroup("", (ExceptionGroup("", (ValueError(),)),))
350350
351351 # allow_unwrapped
352- with RaisesGroups (ValueError, allow_unwrapped=True):
352+ with RaisesGroup (ValueError, allow_unwrapped=True):
353353 raise ValueError
354354
355355
@@ -358,7 +358,7 @@ class RaisesGroup(AbstractRaises[BaseExceptionGroup[BaseExcT_co]]):
358358
359359 The matching algorithm is greedy, which means cases such as this may fail::
360360
361- with RaisesGroups (ValueError, RaisesExc(ValueError, match="hello")):
361+ with RaisesGroup (ValueError, RaisesExc(ValueError, match="hello")):
362362 raise ExceptionGroup("", (ValueError("hello"), ValueError("goodbye")))
363363
364364 even though it generally does not care about the order of the exceptions in the group.
@@ -620,7 +620,7 @@ def matches(
620620
621621 with pytest.raises(TypeError) as excinfo:
622622 ...
623- assert RaisesGroups (ValueError).matches(excinfo.value.__cause__)
623+ assert RaisesGroup (ValueError).matches(excinfo.value.__cause__)
624624 # the above line is equivalent to
625625 myexc = excinfo.value.__cause
626626 assert isinstance(myexc, BaseExceptionGroup)
0 commit comments