MCPcopy Index your code
hub / github.com/DeepL/deepl-python / test_parse_timestamp_nanoseconds

Function test_parse_timestamp_nanoseconds

tests/test_util.py:49–54  ·  view source on GitHub ↗

7-digit fractional seconds (nanoseconds) should be truncated to 6.

()

Source from the content-addressed store, hash-verified

47
48
49def test_parse_timestamp_nanoseconds():
50 """7-digit fractional seconds (nanoseconds) should be truncated to 6."""
51 result = parse_timestamp("2025-01-15T10:30:00.1234567+0000")
52 assert result == datetime.datetime(
53 2025, 1, 15, 10, 30, 0, 123456, tzinfo=datetime.timezone.utc
54 )
55
56
57def test_parse_timestamp_extra_nanoseconds():

Callers

nothing calls this directly

Calls 1

parse_timestampFunction · 0.90

Tested by

no test coverage detected