File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments