We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 24e2b75 commit 4b0b69fCopy full SHA for 4b0b69f
1 file changed
tests/test_isoptional.py
@@ -1,6 +1,9 @@
1
import inspect
2
+import sys
3
from typing import Optional, Union
4
5
+import pytest
6
+
7
from aiohttp_deps.swagger import _is_optional
8
9
@@ -40,7 +43,7 @@ def tfunc(param: Union[int, str]):
40
43
assert not _is_optional(param)
41
44
42
45
-# @pytest.mark.skip("We doesn't support 3.10 annotation style yet.")
46
+@pytest.mark.skipif(sys.version_info < (3, 10), reason="Unsupported syntax")
47
def test_new_type_style():
48
def tfunc(param: "int | None"):
49
"""Nothing."""
@@ -50,6 +53,7 @@ def tfunc(param: "int | None"):
50
53
assert _is_optional(param)
51
54
52
55
56
57
def test_string_annotation():
58
59
0 commit comments