()
| 52 | |
| 53 | |
| 54 | def test_parsing_model_naming(): |
| 55 | with pytest.raises(ValidationError) as exc_info: |
| 56 | parse_obj_as(int, 'a') |
| 57 | assert str(exc_info.value).split('\n')[0] == '1 validation error for int' |
| 58 | |
| 59 | with pytest.raises(ValidationError) as exc_info: |
| 60 | with pytest.warns(PydanticDeprecatedSince20, match='The type_name parameter is deprecated'): |
| 61 | parse_obj_as(int, 'a', type_name='ParsingModel') |
| 62 | assert str(exc_info.value).split('\n')[0] == '1 validation error for int' |
| 63 | |
| 64 | |
| 65 | def test_parse_as_dataclass(): |
nothing calls this directly
no test coverage detected