Closed
Description
Hello,
Firstly thanks for this library it's really useful, we have noticed some unusual behaviour on version 3.2.0 validation using multipleOf
constraint for example:
>>> from jsonschema import validate
>>> schema = {
... "type" : "object",
... "properties" : {
... "test" : {"type" : "number", "multipleOf": 0.001},
... },
... }
>>> # This should be valid but raises validation error
>>> validate(instance={"test" : 0.95}, schema=schema)
Some other things we noticed using the above value this passes:
>>> # This is valid
>>> validate(instance={"test" : 0.01}, schema=schema)
>>> # This is valid
>>> validate(instance={"test" : 0.1}, schema=schema)
>>> # This is invalid
>>> validate(instance={"test" : 0.95}, schema=schema)
Metadata
Metadata
Assignees
Labels
No labels