aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_check.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_check.py')
-rw-r--r--tests/test_check.py10
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)