(value)
| 249 | |
| 250 | @pytest.mark.parametrize('value', [2.2250738585072011e308, float('nan'), float('inf')]) |
| 251 | def test_int_overflow_validation(value): |
| 252 | class Model(BaseModel): |
| 253 | a: int |
| 254 | |
| 255 | with pytest.raises(ValidationError) as exc_info: |
| 256 | Model(a=value) |
| 257 | assert exc_info.value.errors(include_url=False) == [ |
| 258 | {'type': 'finite_number', 'loc': ('a',), 'msg': 'Input should be a finite number', 'input': value} |
| 259 | ] |
| 260 | |
| 261 | |
| 262 | def test_frozenset_validation(): |