  
  class TestSaveLoad(TestCase):
  
      def test_simple_roundtrip(self):
          duration = datetime.timedelta(days=123, seconds=123, microseconds=123)
          DurationModel.objects.create(field=duration)
          loaded = DurationModel.objects.get()
          self.assertEqual(loaded.field, duration)
  
      def test_create_empty(self):
 
</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)
        duration = datetime.timedelta(microseconds=8999999999999999)
  
  class TestSaveLoad(TestCase):
  
      def test_simple_roundtrip(self):
        duration = datetime.timedelta(microseconds=8999999999999999)
          DurationModel.objects.create(field=duration)
          loaded = DurationModel.objects.get()
          self.assertEqual(loaded.field, duration)
  
      def test_create_empty(self):
keep keep keep keep replace keep keep keep keep keep
 Fixed #28926 -- Fixed loss of precision of big DurationField values on SQLite and MySQL. 
tests/model_fields/test_durationfield.py