diff options
author | Yen Chi Hsuan <yan12125@gmail.com> | 2016-04-23 18:28:49 +0800 |
---|---|---|
committer | Yen Chi Hsuan <yan12125@gmail.com> | 2016-05-10 14:51:38 +0800 |
commit | dab0daeeb0929b9b560d2b9a5f39c1e2e6dfa449 (patch) | |
tree | ed4c6036aa4e509a9d46e9c184c819702fb4f5c5 /test/test_compat.py | |
parent | 4350b74545ea3d3ce072444655613bc6974d5516 (diff) |
[utils,compat] Move struct_pack and struct_unpack to compat.py
Diffstat (limited to 'test/test_compat.py')
-rw-r--r-- | test/test_compat.py | 5 |
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() |