  
      def test_negative(self):
          duration = datetime.timedelta(days=-1, hours=1, minutes=3, seconds=5)
          self.assertEqual(parse_duration(duration_iso_string(duration)).total_seconds(), duration.total_seconds())
 
</s> remove         duration = datetime.timedelta(days=123, seconds=123, microseconds=123)
 </s> add         duration = datetime.timedelta(microseconds=8999999999999999) </s> remove     return (left - right).total_seconds() * 1000000
 </s> add     return duration_microseconds(left - right) </s> remove         # Discard any fractional microseconds due to floating point arithmetic.
        return round(value.total_seconds() * 1000000)
 </s> add         return duration_microseconds(value)
class TestDurationMicroseconds(unittest.TestCase):
    def test(self):
        deltas = [
            datetime.timedelta.max,
            datetime.timedelta.min,
            datetime.timedelta.resolution,
            -datetime.timedelta.resolution,
            datetime.timedelta(microseconds=8999999999999999),
        ]
        for delta in deltas:
            with self.subTest(delta=delta):
                self.assertEqual(datetime.timedelta(microseconds=duration_microseconds(delta)), delta)
  
      def test_negative(self):
          duration = datetime.timedelta(days=-1, hours=1, minutes=3, seconds=5)
          self.assertEqual(parse_duration(duration_iso_string(duration)).total_seconds(), duration.total_seconds())
class TestDurationMicroseconds(unittest.TestCase):
    def test(self):
        deltas = [
            datetime.timedelta.max,
            datetime.timedelta.min,
            datetime.timedelta.resolution,
            -datetime.timedelta.resolution,
            datetime.timedelta(microseconds=8999999999999999),
        ]
        for delta in deltas:
            with self.subTest(delta=delta):
                self.assertEqual(datetime.timedelta(microseconds=duration_microseconds(delta)), delta)
keep keep keep add
 Fixed #28926 -- Fixed loss of precision of big DurationField values on SQLite and MySQL. 
tests/utils_tests/test_duration.py