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

Function test_object_schema

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

Source from the content-addressed store, hash-verified

157
158
159def test_object_schema():
160 schema = {
161 "type": "object",
162 "properties": {
163 "name": {"type": "string", "default": "John"},
164 "age": {"type": "integer", "minimum": 0},
165 },
166 "required": ["name"],
167 "description": "Person object",
168 }
169 result = transform_schema(schema)
170 assert result == snapshot(
171 {
172 "type": "object",
173 "description": "Person object",
174 "properties": {
175 "name": {"type": "string", "description": "{default: John}"},
176 "age": {"type": "integer", "description": "{minimum: 0}"},
177 },
178 "additionalProperties": False,
179 "required": ["name"],
180 }
181 )
182
183
184def test_array_schema():

Callers

nothing calls this directly

Calls 1

transform_schemaFunction · 0.90

Tested by

no test coverage detected