aboutsummaryrefslogtreecommitdiff
path: root/test/test_utils.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-12-06 12:14:26 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2014-12-06 12:14:26 +0100
commit5f9b83944da7c531f82ace0ce9275c2661e7187e (patch)
tree82b90a6530efef3ee83158125831519ec94d36d2 /test/test_utils.py
parentf6735be4da1da24be3a2d90461069d192900838a (diff)
[ffmpeg] Improve version check and call it from hls (Fixes #4377)
Diffstat (limited to 'test/test_utils.py')
-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()