Skip to content

Commit

Permalink
Test one more case
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Oct 16, 2024
1 parent 092bf3e commit fbf60a1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/core/test_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,12 @@ def test_conform_primitives():

assert _conform_primitive_property(None, {"type": "boolean"}) is None
assert _conform_primitive_property(0, {"type": "boolean"}) is False
assert (
_conform_primitive_property(
0, {"anyOf": [{"type": "boolean"}, {"type": "integer"}]}
)
== 0
)
assert _conform_primitive_property(0, {"type": ["boolean", "integer"]}) == 0
assert _conform_primitive_property(1, {"type": "boolean"}) is True
assert _conform_primitive_property(1, {"type": ["boolean", "null"]}) is True
Expand Down

0 comments on commit fbf60a1

Please sign in to comment.