aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_compat.py5
-rw-r--r--test/test_utils.py4
2 files changed, 5 insertions, 4 deletions
diff --git a/test/test_compat.py b/test/test_compat.py
index 9adf75763..dd62a5d6b 100644
--- a/test/test_compat.py
+++ b/test/test_compat.py
@@ -20,6 +20,7 @@ from youtube_dl.compat import (
compat_urllib_parse_unquote,
compat_urllib_parse_unquote_plus,
compat_urllib_parse_urlencode,
+ struct_unpack,
)
@@ -102,5 +103,9 @@ class TestCompat(unittest.TestCase):
self.assertTrue(isinstance(doc.find('chinese').text, compat_str))
self.assertTrue(isinstance(doc.find('foo/bar').text, compat_str))
+ def test_struct_unpack(self):
+ self.assertEqual(struct_unpack('!B', b'\x00'), (0,))
+
+
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_utils.py b/test/test_utils.py
index 00ada95ec..5702ffa97 100644
--- a/test/test_utils.py
+++ b/test/test_utils.py
@@ -55,7 +55,6 @@ from youtube_dl.utils import (
smuggle_url,
str_to_int,
strip_jsonp,
- struct_unpack,
timeconvert,
unescapeHTML,
unified_strdate,
@@ -457,9 +456,6 @@ class TestUtil(unittest.TestCase):
testPL(5, 2, (2, 99), [2, 3, 4])
testPL(5, 2, (20, 99), [])
- def test_struct_unpack(self):
- self.assertEqual(struct_unpack('!B', b'\x00'), (0,))
-
def test_read_batch_urls(self):
f = io.StringIO('''\xef\xbb\xbf foo
bar\r