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

Function test_float_edge_values

tests/test_security_inputs.py:351–358  ·  view source on GitHub ↗

NaN/Inf representations must not crash.

()

Source from the content-addressed store, hash-verified

349
350
351def 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
361def test_datetime_edge_values():

Callers

nothing calls this directly

Calls 1

_check_no_crashFunction · 0.85

Tested by

no test coverage detected