From dab0daeeb0929b9b560d2b9a5f39c1e2e6dfa449 Mon Sep 17 00:00:00 2001
From: Yen Chi Hsuan <yan12125@gmail.com>
Date: Sat, 23 Apr 2016 18:28:49 +0800
Subject: [utils,compat] Move struct_pack and struct_unpack to compat.py

---
 test/test_compat.py | 5 +++++
 test/test_utils.py  | 4 ----
 2 files changed, 5 insertions(+), 4 deletions(-)

(limited to 'test')

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
-- 
cgit v1.2.3