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

Method test_microseconds

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

Source from the content-addressed store, hash-verified

19 self.assertEqual(duration_string(duration), "1 01:03:05")
20
21 def test_microseconds(self):
22 duration = datetime.timedelta(hours=1, minutes=3, seconds=5, microseconds=12345)
23 self.assertEqual(duration_string(duration), "01:03:05.012345")
24
25 def test_negative(self):
26 duration = datetime.timedelta(days=-1, hours=1, minutes=3, seconds=5)

Callers

nothing calls this directly

Calls 1

duration_stringFunction · 0.90

Tested by

no test coverage detected