import exceptiongroup on <3.11
This commit is contained in:
parent
91084644a0
commit
e577541b4b
|
@ -1,6 +1,7 @@
|
|||
import math
|
||||
import pprint
|
||||
import re
|
||||
import sys
|
||||
from collections.abc import Collection
|
||||
from collections.abc import Sized
|
||||
from decimal import Decimal
|
||||
|
@ -25,16 +26,16 @@ from typing import TYPE_CHECKING
|
|||
from typing import TypeVar
|
||||
from typing import Union
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from typing_extensions import TypeAlias, TypeGuard
|
||||
|
||||
|
||||
import _pytest._code
|
||||
from _pytest.compat import STRING_TYPES
|
||||
from _pytest.outcomes import fail
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from numpy import ndarray
|
||||
from typing_extensions import TypeAlias, TypeGuard
|
||||
|
||||
if sys.version_info < (3, 11):
|
||||
from exceptiongroup import BaseExceptionGroup
|
||||
|
||||
|
||||
def _non_numeric_type_error(value, at: Optional[str]) -> TypeError:
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import sys
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
import pytest
|
||||
|
@ -9,6 +10,9 @@ from _pytest.python_api import Matcher
|
|||
if TYPE_CHECKING:
|
||||
from typing_extensions import assert_type
|
||||
|
||||
if sys.version_info < (3, 11):
|
||||
from exceptiongroup import ExceptionGroup
|
||||
|
||||
|
||||
class TestExpectedExceptionGroup:
|
||||
def test_expected_exception_group(self) -> None:
|
||||
|
|
Loading…
Reference in New Issue