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

Function test_allof

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

Source from the content-addressed store, hash-verified

131
132
133def test_allof():
134 schema = {
135 "allOf": [
136 {"type": "object", "properties": {"name": {"type": "string"}}},
137 {"type": "object", "properties": {"age": {"type": "integer", "minimum": 0}}},
138 ]
139 }
140 result = transform_schema(schema)
141 assert result == snapshot(
142 {
143 "allOf": [
144 {
145 "type": "object",
146 "properties": {"name": {"type": "string"}},
147 "additionalProperties": False,
148 },
149 {
150 "type": "object",
151 "properties": {"age": {"type": "integer", "description": "{minimum: 0}"}},
152 "additionalProperties": False,
153 },
154 ]
155 }
156 )
157
158
159def test_object_schema():

Callers

nothing calls this directly

Calls 1

transform_schemaFunction · 0.90

Tested by

no test coverage detected