mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #28926 -- Fixed loss of precision of big DurationField values on SQLite and MySQL.
This commit is contained in:
committed by
Tim Graham
parent
46d1af2e82
commit
ae6fa914aa
@@ -12,7 +12,7 @@ from .models import DurationModel, NullDurationModel
|
||||
class TestSaveLoad(TestCase):
|
||||
|
||||
def test_simple_roundtrip(self):
|
||||
duration = datetime.timedelta(days=123, seconds=123, microseconds=123)
|
||||
duration = datetime.timedelta(microseconds=8999999999999999)
|
||||
DurationModel.objects.create(field=duration)
|
||||
loaded = DurationModel.objects.get()
|
||||
self.assertEqual(loaded.field, duration)
|
||||
|
||||
Reference in New Issue
Block a user