Skip to content

Commit ff7976c

Browse files
committed
Cover legacy template test branches
1 parent 992c6c0 commit ff7976c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/model/test_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ def test_pydantic_v2_legacy_extra_template_warns_when_not_fully_rewritten(custom
298298
match customization:
299299
case "missing-tail":
300300
template_source = template_source.rsplit("{%- for field in fields %}", 1)[0]
301-
case "missing-class-body":
301+
case _:
302302
template_source = template_source.replace(
303303
"{%- for line in class_body_lines %}\n {{ line }}\n{%- endfor %}\n",
304304
"",
@@ -321,7 +321,7 @@ def test_pydantic_v2_legacy_extra_template_warns_when_not_fully_rewritten(custom
321321
match customization:
322322
case "missing-tail":
323323
assert "'__pydantic_extra__': Dict[str, str]," in rendered
324-
case "missing-class-body":
324+
case _:
325325
assert "Model.__annotations__['__pydantic_extra__'] = Dict[str, str]" in rendered
326326

327327

0 commit comments

Comments
 (0)