aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_utils.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test_utils.py b/test/test_utils.py
index badab1370..5c7bf5175 100644
--- a/test/test_utils.py
+++ b/test/test_utils.py
@@ -48,6 +48,7 @@ from youtube_dl.utils import (
intlist_to_bytes,
args_to_str,
parse_filesize,
+ version_tuple,
)
@@ -381,5 +382,10 @@ class TestUtil(unittest.TestCase):
self.assertEqual(parse_filesize('1.2Tb'), 1200000000000)
self.assertEqual(parse_filesize('1,24 KB'), 1240)
+ def test_version_tuple(self):
+ self.assertEqual(version_tuple('1'), (1,))
+ self.assertEqual(version_tuple('10.23.344'), (10, 23, 344))
+ self.assertEqual(version_tuple('10-6'), (10, 6)) # avconv style
+
if __name__ == '__main__':
unittest.main()