Skip to content

Commit f829bc9

Browse files
committed
test, too
1 parent 07bdd83 commit f829bc9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/serializers/test_complex.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,9 @@ def test_complex_json(value, expected):
3737
assert math.isnan(c.real)
3838
else:
3939
assert c.imag == value.imag
40+
41+
42+
def test_complex_inference() -> None:
43+
s = SchemaSerializer(core_schema.any_schema())
44+
assert s.to_python(1 + 2j) == 1 + 2j
45+
assert s.to_json(1 + 2j) == '1+2j'

0 commit comments

Comments
 (0)