MCPcopy
hub / github.com/django/django / test_microseconds

Method test_microseconds

tests/utils_tests/test_duration.py:57–59  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

55 self.assertEqual(duration_iso_string(duration), "P1DT01H03M05S")
56
57 def test_microseconds(self):
58 duration = datetime.timedelta(hours=1, minutes=3, seconds=5, microseconds=12345)
59 self.assertEqual(duration_iso_string(duration), "P0DT01H03M05.012345S")
60
61 def test_negative(self):
62 duration = -1 * datetime.timedelta(days=1, hours=1, minutes=3, seconds=5)

Callers

nothing calls this directly

Calls 1

duration_iso_stringFunction · 0.90

Tested by

no test coverage detected