mirror of
https://github.com/django/django.git
synced 2025-10-09 10:10:28 +00:00
Refs #30803 -- Allowed comma separators for decimal fractions in parse_duration().
This commit is contained in:
parent
cab3661832
commit
42b23d1e79
4 changed files with 12 additions and 2 deletions
|
@ -131,10 +131,12 @@ class DurationParseTests(unittest.TestCase):
|
|||
('P4W', None),
|
||||
('P4D', timedelta(days=4)),
|
||||
('P0.5D', timedelta(hours=12)),
|
||||
('P0,5D', timedelta(hours=12)),
|
||||
('PT5H', timedelta(hours=5)),
|
||||
('PT5M', timedelta(minutes=5)),
|
||||
('PT5S', timedelta(seconds=5)),
|
||||
('PT0.000005S', timedelta(microseconds=5)),
|
||||
('PT0,000005S', timedelta(microseconds=5)),
|
||||
)
|
||||
for source, expected in test_values:
|
||||
with self.subTest(source=source):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue