diff options
Diffstat (limited to 'tests/functional/t/try_except_raise_crash.py')
-rw-r--r-- | tests/functional/t/try_except_raise_crash.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/functional/t/try_except_raise_crash.py b/tests/functional/t/try_except_raise_crash.py index 7a1f8d972..48a043493 100644 --- a/tests/functional/t/try_except_raise_crash.py +++ b/tests/functional/t/try_except_raise_crash.py @@ -1,15 +1,16 @@ # pylint: disable=missing-docstring,too-many-ancestors, broad-except import collections.abc -from typing import TYPE_CHECKING, Any, MutableMapping +from typing import TYPE_CHECKING, Sized if TYPE_CHECKING: - BaseClass = MutableMapping[str, Any] + BaseClass = Sized else: - BaseClass = collections.abc.MutableMapping + BaseClass = collections.abc.Sized class TestBaseException(BaseClass): - pass + def __len__(self): + return 0 class TestException(TestBaseException): @@ -19,7 +20,7 @@ class TestException(TestBaseException): def test(): try: 1 / 0 - except TestException: # [try-except-raise] + except TestException: # [catching-non-exception,try-except-raise] raise except Exception: pass |