summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorYen Chi Hsuan <[email protected]>2016-08-20 00:12:32 +0800
committerYen Chi Hsuan <[email protected]>2016-08-20 00:17:26 +0800
commit70852b47ca101f0b4acc76eb3213b763a14b3602 (patch)
tree2657ec4ed07313970481913223e0d98cbe566aee /test
parenta9a3b4a081a6793f0dd0b40be8429a2aa3c1c36d (diff)
downloadyoutube-dl-70852b47ca101f0b4acc76eb3213b763a14b3602.tar.gz
youtube-dl-70852b47ca101f0b4acc76eb3213b763a14b3602.zip
[utils] Recognize units with full names in parse_filename
Reference: https://en.wikipedia.org/wiki/Template:Quantities_of_bytes
Diffstat (limited to 'test')
-rw-r--r--test/test_utils.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/test_utils.py b/test/test_utils.py
index b83da93b4..d16ea7f77 100644
--- a/test/test_utils.py
+++ b/test/test_utils.py
@@ -823,6 +823,7 @@ class TestUtil(unittest.TestCase):
self.assertEqual(parse_filesize('1.2tb'), 1200000000000)
self.assertEqual(parse_filesize('1,24 KB'), 1240)
self.assertEqual(parse_filesize('1,24 kb'), 1240)
+ self.assertEqual(parse_filesize('8.5 megabytes'), 8500000)
def test_parse_count(self):
self.assertEqual(parse_count(None), None)