We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 59837ef commit 1cdd431Copy full SHA for 1cdd431
tests/test_converters.py
@@ -87,6 +87,11 @@ def test_literal():
87
assert field.default_value == 3
88
assert field.type.of_type.__name__.startswith("UnionOf")
89
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
95
def test_literal_singleton():
96
field = _convert_field_from_spec("attr", (T.Literal["literal1"], "literal1"))
97
assert issubclass(field.type.of_type, graphene.String)
0 commit comments