aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2013-12-06 13:36:36 +0100
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2013-12-06 13:36:36 +0100
commitf53c966a73df42a9a949912ef8ab99a64fb99466 (patch)
treecad9af28cebceabf24ef90085f31b0942e4773f5 /test
parent336c3a69bd198130e2f65f14dfc83383fec7c5e2 (diff)
[dailymotion] Extract view count (#1895)
Diffstat (limited to 'test')
-rw-r--r--test/test_utils.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/test_utils.py b/test/test_utils.py
index e9e590e74..0fa66beec 100644
--- a/test/test_utils.py
+++ b/test/test_utils.py
@@ -26,6 +26,7 @@ from youtube_dl.utils import (
unsmuggle_url,
shell_quote,
encodeFilename,
+ str_to_int,
)
if sys.version_info < (3, 0):
@@ -176,6 +177,10 @@ class TestUtil(unittest.TestCase):
args = ['ffmpeg', '-i', encodeFilename(u'ñ€ß\'.mp4')]
self.assertEqual(shell_quote(args), u"""ffmpeg -i 'ñ€ß'"'"'.mp4'""")
+ def test_str_to_int(self):
+ self.assertEqual(str_to_int('123,456'), 123456)
+ self.assertEqual(str_to_int('123.456'), 123456)
+
if __name__ == '__main__':
unittest.main()