MCPcopy
hub / github.com/django/django / test_negative

Method test_negative

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

Source from the content-addressed store, hash-verified

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)
63 self.assertEqual(duration_iso_string(duration), "-P1DT01H03M05S")
64
65
66class TestParseISODurationRoundtrip(unittest.TestCase):

Callers

nothing calls this directly

Calls 1

duration_iso_stringFunction · 0.90

Tested by

no test coverage detected