mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-10 00:58:17 +02:00
[test_utils] Add more tests for parse_duration
This commit is contained in:
parent
227d4822ff
commit
a5fb718c50
@ -212,6 +212,8 @@ def test_url_basename(self):
|
|||||||
|
|
||||||
def test_parse_duration(self):
|
def test_parse_duration(self):
|
||||||
self.assertEqual(parse_duration(None), None)
|
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('1'), 1)
|
||||||
self.assertEqual(parse_duration('1337:12'), 80232)
|
self.assertEqual(parse_duration('1337:12'), 80232)
|
||||||
self.assertEqual(parse_duration('9:12:43'), 33163)
|
self.assertEqual(parse_duration('9:12:43'), 33163)
|
||||||
|
Loading…
Reference in New Issue
Block a user