()
| 578 | |
| 579 | # Complete tests exist in pydantic-core: |
| 580 | def test_json_ensure_ascii() -> None: |
| 581 | ta = TypeAdapter(str) |
| 582 | |
| 583 | assert ta.dump_json('à', ensure_ascii=True) == b'"\\u00e0"' |
| 584 | |
| 585 | class Model(BaseModel): |
| 586 | f: str |
| 587 | |
| 588 | assert Model(f='à').model_dump_json(ensure_ascii=True) == '{"f":"\\u00e0"}' |
nothing calls this directly
no test coverage detected