diff options
author | Sergey M․ <dstftw@gmail.com> | 2014-08-31 06:41:30 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2014-08-31 06:41:30 +0700 |
commit | ca7b3246b69215c890193acaf4eab746bc19504e (patch) | |
tree | d039cbfe389645e396293eb1211500d0875066b2 /test/test_utils.py | |
parent | 9c4c233b846bd9be4c48b788d6d2347af764f15d (diff) |
[utils] Improve parse_duration
Diffstat (limited to 'test/test_utils.py')
-rw-r--r-- | test/test_utils.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/test_utils.py b/test/test_utils.py index 3d14f61fb..8d8997977 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -211,6 +211,9 @@ class TestUtil(unittest.TestCase): self.assertEqual(parse_duration('00:01:01'), 61) self.assertEqual(parse_duration('x:y'), None) self.assertEqual(parse_duration('3h11m53s'), 11513) + self.assertEqual(parse_duration('3h 11m 53s'), 11513) + self.assertEqual(parse_duration('3 hours 11 minutes 53 seconds'), 11513) + self.assertEqual(parse_duration('3 hours 11 mins 53 secs'), 11513) self.assertEqual(parse_duration('62m45s'), 3765) self.assertEqual(parse_duration('6m59s'), 419) self.assertEqual(parse_duration('49s'), 49) |