Refs #30803 -- Allowed comma separators for decimal fractions in parse_duration().

This commit is contained in:
Farhaan Bukhsh 2019-11-27 08:14:00 +01:00 committed by Mariusz Felisiak
parent cab3661832
commit 42b23d1e79
4 changed files with 12 additions and 2 deletions

View file

@ -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):