Skip to content

Commit 6c8c222

Browse files
committed
fix tests
1 parent cc53b24 commit 6c8c222

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tests/validators/test_dict.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,7 @@ def test_dict_complex_key():
253253

254254

255255
def test_json_dict_complex_key():
256-
v = SchemaValidator(
257-
{'type': 'dict', 'keys_schema': {'type': 'complex'}, 'values_schema': {'type': 'int'}}
258-
)
256+
v = SchemaValidator({'type': 'dict', 'keys_schema': {'type': 'complex'}, 'values_schema': {'type': 'int'}})
259257
assert v.validate_json('{"1+2j": 2, "-3": 4}') == {complex(1, 2): 2, complex(-3, 0): 4}
260258
assert v.validate_json('{"1+2j": 2, "infj": 4}') == {complex(1, 2): 2, complex(0, float('inf')): 4}
261259
with pytest.raises(ValidationError, match='Input should be a valid complex string'):

0 commit comments

Comments
 (0)