MCPcopy
hub / github.com/pydantic/pydantic / test_float

Function test_float

pydantic-core/tests/test_json.py:105–111  ·  view source on GitHub ↗
(input_value, expected)

Source from the content-addressed store, hash-verified

103 ],
104)
105def test_float(input_value, expected):
106 v = SchemaValidator(core_schema.float_schema())
107 if isinstance(expected, Err):
108 with pytest.raises(ValidationError, match=re.escape(expected.message)):
109 v.validate_json(input_value)
110 else:
111 assert v.validate_json(input_value) == expected
112
113
114def test_typed_dict():

Callers

nothing calls this directly

Calls 2

float_schemaMethod · 0.80
validate_jsonMethod · 0.45

Tested by

no test coverage detected