aboutsummaryrefslogtreecommitdiff
path: root/test/test_compat.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_compat.py')
-rw-r--r--test/test_compat.py5
1 files changed, 5 insertions, 0 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()