(create_module)
| 14 | |
| 15 | |
| 16 | def test_postponed_annotations(create_module): |
| 17 | module = create_module( |
| 18 | class="cm"># language=Python |
| 19 | class="st">""" |
| 20 | from __future__ import annotations |
| 21 | from pydantic import BaseModel |
| 22 | |
| 23 | class Model(BaseModel): |
| 24 | a: int |
| 25 | class="st">""" |
| 26 | ) |
| 27 | m = module.Model(a=&class="cm">#x27;123') |
| 28 | assert m.model_dump() == {&class="cm">#x27;a': 123} |
| 29 | |
| 30 | |
| 31 | def test_postponed_annotations_auto_model_rebuild(create_module): |
nothing calls this directly
no test coverage detected