NaN/Inf representations must not crash.
()
| 349 | |
| 350 | |
| 351 | def test_float_edge_values(): |
| 352 | """NaN/Inf representations must not crash.""" |
| 353 | def run(): |
| 354 | for val in ["nan", "inf", "-inf", "NaN", "Infinity"]: |
| 355 | r = parse("{:f}", val) |
| 356 | if r is not None: |
| 357 | assert isinstance(r[0], float) |
| 358 | _check_no_crash(run) |
| 359 | |
| 360 | |
| 361 | def test_datetime_edge_values(): |
nothing calls this directly
no test coverage detected