aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_utils.py
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2016-06-26 15:16:49 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2016-06-26 15:16:49 +0800
commit1143535d762fc4260aacc108f2c41079867f9f00 (patch)
tree2cb797f25191ad658652d5d963505462e6ec6833 /test/test_utils.py
parent7d52c052efe7accf098bca84aef0ea70caa64889 (diff)
downloadyoutube-dl-1143535d762fc4260aacc108f2c41079867f9f00.zip
youtube-dl-1143535d762fc4260aacc108f2c41079867f9f00.tar.gz
youtube-dl-1143535d762fc4260aacc108f2c41079867f9f00.tar.bz2
[utils] Add urshift()
Used in IqiyiIE and LeIE
Diffstat (limited to 'test/test_utils.py')
-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 7f9385d..ed61e4c 100644
--- a/test/test_utils.py
+++ b/test/test_utils.py
@@ -66,6 +66,7 @@ from youtube_dl.utils import (
lowercase_escape,
url_basename,
urlencode_postdata,
+ urshift,
update_url_query,
version_tuple,
xpath_with_ns,
@@ -980,5 +981,9 @@ The first line
self.assertRaises(ValueError, encode_base_n, 0, 70)
self.assertRaises(ValueError, encode_base_n, 0, 60, custom_table)
+ def test_urshift(self):
+ self.assertEqual(urshift(3, 1), 1)
+ self.assertEqual(urshift(-3, 1), 2147483646)
+
if __name__ == '__main__':
unittest.main()