File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ from acp .schema import AvailableCommandInput , ReadTextFileRequest
12from scripts .gen_all import resolve_ref , schema_source_paths
23from scripts .gen_schema import (
34 _deserialize_field_specs ,
910)
1011
1112
13+ def test_generated_field_descriptions_are_introspectable () -> None :
14+ path_description = "Absolute path to the file to read."
15+ assert ReadTextFileRequest .model_fields ["path" ].description == path_description
16+ assert ReadTextFileRequest .model_json_schema ()["properties" ]["path" ]["description" ] == path_description
17+
18+ root_description = "The input specification for a command."
19+ assert AvailableCommandInput .model_fields ["root" ].description == root_description
20+ assert AvailableCommandInput .model_json_schema ()["description" ] == root_description
21+
22+
1223def test_resolve_ref_accepts_schema_release_tags () -> None :
1324 assert resolve_ref ("schema-v1.16.0" ) == "refs/tags/schema-v1.16.0"
1425
You can’t perform that action at this time.
0 commit comments