diff options
| author | Louis Burda <dev@sinitax.com> | 2025-11-12 09:41:37 +0100 |
|---|---|---|
| committer | Louis Burda <dev@sinitax.com> | 2025-11-12 09:41:37 +0100 |
| commit | 38bfc3fb54021c9e9a4e9c7bd02d686c873aa134 (patch) | |
| tree | a7095137819228c78b203c58d0fe2913864a8056 /tests/test_check.py | |
| parent | 12688e0a31438a7da16ba1831ab3d4c68c6e19c4 (diff) | |
| download | bearcheck-main.tar.gz bearcheck-main.zip | |
Diffstat (limited to 'tests/test_check.py')
| -rw-r--r-- | tests/test_check.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/test_check.py b/tests/test_check.py index 994b72d..8cf00f7 100644 --- a/tests/test_check.py +++ b/tests/test_check.py @@ -1,5 +1,5 @@ -from typing import Literal, assert_type -from bearcheck import Check, bearcheck, beartest +from typing import TYPE_CHECKING, Any, Literal, assert_type +from bearcheck import Check, CheckType, bearcheck, beartest from beartype.roar import BeartypeDoorHintViolation import pytest @@ -25,3 +25,9 @@ def test_missing_generic() -> None: bearcheck(123, "bla") # type: ignore with pytest.raises(ValueError): beartest(123, "bla") # type: ignore + + +if TYPE_CHECKING: + + def wrap(a: Any, check: type[Check[CheckType]]) -> CheckType: + return bearcheck(a, check) |
