remove unused _unroll_exceptions

This commit is contained in:
jakkdl 2024-01-21 17:32:55 +01:00
parent 620f19b70c
commit 2a12ed97ce
1 changed files with 0 additions and 13 deletions

View File

@ -11,7 +11,6 @@ from typing import Callable
from typing import cast
from typing import ContextManager
from typing import final
from typing import Iterable
from typing import List
from typing import Mapping
from typing import Optional
@ -1033,18 +1032,6 @@ class RaisesGroup(ContextManager[_pytest._code.ExceptionInfo[BaseExceptionGroup[
] = _pytest._code.ExceptionInfo.for_later()
return self.excinfo
def _unroll_exceptions(
self, exceptions: Iterable[BaseException]
) -> Iterable[BaseException]:
res: list[BaseException] = []
for exc in exceptions:
if isinstance(exc, BaseExceptionGroup):
res.extend(self._unroll_exceptions(exc.exceptions))
else:
res.append(exc)
return res
def matches(
self,
exc_val: Optional[BaseException],