We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 77577fc commit 9da308bCopy full SHA for 9da308b
1 file changed
tests/test_isoptional.py
@@ -1,5 +1,4 @@
1
import inspect
2
-import sys
3
from typing import Optional, Union
4
5
import pytest
@@ -43,9 +42,19 @@ def tfunc(param: Union[int, str]):
43
42
assert not _is_optional(param)
44
45
46
-@pytest.mark.skipif(sys.version_info < (3, 10), reason="requires python3.10 or higher")
+@pytest.mark.skip("We doesn't support 3.10 annotation style yet.")
47
def test_new_type_style():
48
- def tfunc(param: int | None):
+ def tfunc(param: "int | None"):
+ """Nothing."""
49
+
50
+ param = inspect.signature(tfunc).parameters["param"]
51
52
+ assert _is_optional(param)
53
54
55
+@pytest.mark.skip("We doesn't support string annotations yet.")
56
+def test_string_annotation():
57
58
"""Nothing."""
59
60
param = inspect.signature(tfunc).parameters["param"]
0 commit comments