Skip to content

Commit d17ab72

Browse files
author
Rami Chowdhury
committed
More limits
1 parent 1cdd431 commit d17ab72

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

tests/test_converters.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,9 @@ def test_union():
7676
assert field.type.of_type.__name__.startswith("UnionOf")
7777

7878

79-
if sys.version_info >= (3, 8):
80-
# Python < 3.8 does not support typing.Literal
79+
if sys.version_info >= (3, 10):
80+
# Python < 3.10 does not support typing.Literal except as a
81+
# _SpecialGenericAlias, which Pydantic doesn't like
8182

8283
def test_literal():
8384
field = _convert_field_from_spec(
@@ -87,11 +88,6 @@ def test_literal():
8788
assert field.default_value == 3
8889
assert field.type.of_type.__name__.startswith("UnionOf")
8990

90-
91-
if sys.version_info >= (3, 10):
92-
# Python < 3.10 does not support typing.Literal except as a
93-
# _SpecialGenericAlias, which Pydantic doesn't like
94-
9591
def test_literal_singleton():
9692
field = _convert_field_from_spec("attr", (T.Literal["literal1"], "literal1"))
9793
assert issubclass(field.type.of_type, graphene.String)

0 commit comments

Comments
 (0)