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

Function test_object_schema

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

Source from the content-addressed store, hash-verified

203
204
205def test_object_schema():
206 schema = {
207 "type": "object",
208 "properties": {
209 "name": {"type": "string", "default": "John"},
210 "age": {"type": "integer", "minimum": 0},
211 },
212 "required": ["name"],
213 "description": "Person object",
214 }
215 result = transform_schema(schema)
216 assert result == snapshot(
217 {
218 "type": "object",
219 "description": "Person object",
220 "properties": {
221 "name": {"type": "string", "description": "{default: John}"},
222 "age": {"type": "integer", "description": "{minimum: 0}"},
223 },
224 "additionalProperties": False,
225 "required": ["name"],
226 }
227 )
228
229
230def test_array_schema():

Callers

nothing calls this directly

Calls 1

transform_schemaFunction · 0.90

Tested by

no test coverage detected