Weird but parseable datetime strings must not crash.
()
| 359 | |
| 360 | |
| 361 | def test_datetime_edge_values(): |
| 362 | """Weird but parseable datetime strings must not crash.""" |
| 363 | def run(): |
| 364 | for val in [ |
| 365 | "0000-01-01T00:00:00Z", |
| 366 | "9999-12-31T23:59:59Z", |
| 367 | "1970-01-01T00:00:00+00:00", |
| 368 | ]: |
| 369 | r = parse("At {:ti}", f"At {val}") |
| 370 | if r is not None: |
| 371 | pass # Any Result is acceptable |
| 372 | _check_no_crash(run) |
| 373 | |
| 374 | |
| 375 | # ══════════════════════════════════════════════════════════════════════ |
nothing calls this directly
no test coverage detected