MCPcopy Create free account
hub / github.com/coooodeer/parse-rust / test_datetime_edge_values

Function test_datetime_edge_values

tests/test_security_inputs.py:361–372  ·  view source on GitHub ↗

Weird but parseable datetime strings must not crash.

()

Source from the content-addressed store, hash-verified

359
360
361def 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# ══════════════════════════════════════════════════════════════════════

Callers

nothing calls this directly

Calls 1

_check_no_crashFunction · 0.85

Tested by

no test coverage detected