MCPcopy Create free account
hub / github.com/anthropics/anthropic-sdk-python / test_allof

Function test_allof

tests/lib/_parse/test_transform.py:179–202  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

177
178
179def test_allof():
180 schema = {
181 "allOf": [
182 {"type": "object", "properties": {"name": {"type": "string"}}},
183 {"type": "object", "properties": {"age": {"type": "integer", "minimum": 0}}},
184 ]
185 }
186 result = transform_schema(schema)
187 assert result == snapshot(
188 {
189 "allOf": [
190 {
191 "type": "object",
192 "properties": {"name": {"type": "string"}},
193 "additionalProperties": False,
194 },
195 {
196 "type": "object",
197 "properties": {"age": {"type": "integer", "description": "{minimum: 0}"}},
198 "additionalProperties": False,
199 },
200 ]
201 }
202 )
203
204
205def test_object_schema():

Callers

nothing calls this directly

Calls 1

transform_schemaFunction · 0.90

Tested by

no test coverage detected