projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
227d482
)
[test_utils] Add more tests for parse_duration
author
Sergey M․
<dstftw@gmail.com>
Mon, 12 Jan 2015 15:39:58 +0000
(21:39 +0600)
committer
Sergey M․
<dstftw@gmail.com>
Mon, 12 Jan 2015 15:39:58 +0000
(21:39 +0600)
test/test_utils.py
patch
|
blob
|
history
diff --git
a/test/test_utils.py
b/test/test_utils.py
index 5e16f30a2d2a08220909b04228d97683be486061..399cdfdbd4baddf09866be9972f5ef36d2cf67cc 100644
(file)
--- a/
test/test_utils.py
+++ b/
test/test_utils.py
@@
-212,6
+212,8
@@
class TestUtil(unittest.TestCase):
def test_parse_duration(self):
self.assertEqual(parse_duration(None), None)
+ self.assertEqual(parse_duration(False), None)
+ self.assertEqual(parse_duration('invalid'), None)
self.assertEqual(parse_duration('1'), 1)
self.assertEqual(parse_duration('1337:12'), 80232)
self.assertEqual(parse_duration('9:12:43'), 33163)