Skip to content

Commit 951eb7f

Browse files
Add additional code coverage
1 parent 0d0c85e commit 951eb7f

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

tests/unit_tests/client/test_client.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,42 @@ def test_plan_multi_parameter_fallback_help_text(client):
748748
)
749749

750750

751+
def test_plan_help_text_with_ref(client):
752+
schema = {
753+
"$defs": {
754+
"Spec": {
755+
"properties": {
756+
"foo": {"type": "integer"},
757+
"bar": {"$ref": "#/$defs/InnerSpec"},
758+
},
759+
"required": ["foo", "bar"],
760+
},
761+
"InnerSpec": {
762+
"properties": {
763+
"x": {"type": "number"},
764+
"y": {"default": 10, "type": "number"},
765+
},
766+
"required": ["x"],
767+
},
768+
},
769+
"properties": {
770+
"spec": {"$ref": "#/$defs/Spec"},
771+
"meta": {"type": "string", "default": "abc"},
772+
},
773+
"required": ["spec"],
774+
}
775+
776+
plan = Plan(
777+
"ref_plan",
778+
PlanModel(name="ref_plan", schema=schema),
779+
client,
780+
)
781+
782+
expected = "Plan ref_plan(spec: Spec, meta: str = 'abc')"
783+
784+
assert plan.help_text == expected
785+
786+
751787
def test_plan_properties(client):
752788
plan = Plan(
753789
"foo",

0 commit comments

Comments
 (0)