From 073e2b869df8f43c50fbff8ea8ca89466b74e7f5 Mon Sep 17 00:00:00 2001 From: p1c2u Date: Wed, 4 Mar 2026 00:45:36 +0000 Subject: [PATCH] Add regression test for OAS3.0 array containing null unmarshalling --- .../unmarshalling/test_unmarshallers.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/integration/unmarshalling/test_unmarshallers.py b/tests/integration/unmarshalling/test_unmarshallers.py index f770eda0..060f19cb 100644 --- a/tests/integration/unmarshalling/test_unmarshallers.py +++ b/tests/integration/unmarshalling/test_unmarshallers.py @@ -73,6 +73,23 @@ def test_no_type(self, unmarshallers_factory, value): assert result == value + @pytest.mark.parametrize( + "factory", + [ + oas30_write_schema_unmarshallers_factory, + oas31_schema_unmarshallers_factory, + ], + ) + def test_no_type_object_with_array_of_null(self, factory): + schema = {} + spec = SchemaPath.from_dict(schema) + unmarshaller = factory.create(spec) + value = {"foo": [None]} + + result = unmarshaller.unmarshal(value) + + assert result == value + @pytest.mark.parametrize( "type,value", [