mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed #26324 -- Fixed DurationField with fractional seconds on SQLite.
This commit is contained in:
parent
85a4844f8a
commit
4f0cd0fd16
4 changed files with 14 additions and 1 deletions
|
@ -22,6 +22,12 @@ class TestSaveLoad(TestCase):
|
|||
loaded = NullDurationModel.objects.get()
|
||||
self.assertEqual(loaded.field, None)
|
||||
|
||||
def test_fractional_seconds(self):
|
||||
value = datetime.timedelta(seconds=2.05)
|
||||
d = DurationModel.objects.create(field=value)
|
||||
d.refresh_from_db()
|
||||
self.assertEqual(d.field, value)
|
||||
|
||||
|
||||
class TestQuerying(TestCase):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue