From fbf60a17abaf9e62c81b588011abdb47cd88d193 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez-Mondrag=C3=B3n?= Date: Wed, 16 Oct 2024 14:58:27 -0600 Subject: [PATCH] Test one more case --- tests/core/test_typing.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/core/test_typing.py b/tests/core/test_typing.py index d1e40a119..25d9c68df 100644 --- a/tests/core/test_typing.py +++ b/tests/core/test_typing.py @@ -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