Skip to content

Commit 4b0b69f

Browse files
committed
Fixed tests for old python versions.
Signed-off-by: Pavel Kirilin <win10@list.ru>
1 parent 24e2b75 commit 4b0b69f

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tests/test_isoptional.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import inspect
2+
import sys
23
from typing import Optional, Union
34

5+
import pytest
6+
47
from aiohttp_deps.swagger import _is_optional
58

69

@@ -40,7 +43,7 @@ def tfunc(param: Union[int, str]):
4043
assert not _is_optional(param)
4144

4245

43-
# @pytest.mark.skip("We doesn't support 3.10 annotation style yet.")
46+
@pytest.mark.skipif(sys.version_info < (3, 10), reason="Unsupported syntax")
4447
def test_new_type_style():
4548
def tfunc(param: "int | None"):
4649
"""Nothing."""
@@ -50,6 +53,7 @@ def tfunc(param: "int | None"):
5053
assert _is_optional(param)
5154

5255

56+
@pytest.mark.skipif(sys.version_info < (3, 10), reason="Unsupported syntax")
5357
def test_string_annotation():
5458
def tfunc(param: "int | None"):
5559
"""Nothing."""

0 commit comments

Comments
 (0)