|
|
@ -9,15 +9,16 @@ sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import struct
|
|
|
|
import struct
|
|
|
|
import urllib.parse
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
from yt_dlp import compat
|
|
|
|
from yt_dlp import compat
|
|
|
|
|
|
|
|
from yt_dlp.compat import urllib # isort: split
|
|
|
|
from yt_dlp.compat import (
|
|
|
|
from yt_dlp.compat import (
|
|
|
|
compat_etree_fromstring,
|
|
|
|
compat_etree_fromstring,
|
|
|
|
compat_expanduser,
|
|
|
|
compat_expanduser,
|
|
|
|
compat_urllib_parse_unquote,
|
|
|
|
compat_urllib_parse_unquote,
|
|
|
|
compat_urllib_parse_urlencode,
|
|
|
|
compat_urllib_parse_urlencode,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
from yt_dlp.compat.urllib.request import getproxies
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TestCompat(unittest.TestCase):
|
|
|
|
class TestCompat(unittest.TestCase):
|
|
|
@ -28,8 +29,7 @@ class TestCompat(unittest.TestCase):
|
|
|
|
with self.assertWarns(DeprecationWarning):
|
|
|
|
with self.assertWarns(DeprecationWarning):
|
|
|
|
compat.WINDOWS_VT_MODE
|
|
|
|
compat.WINDOWS_VT_MODE
|
|
|
|
|
|
|
|
|
|
|
|
# TODO: Test submodule
|
|
|
|
self.assertEqual(urllib.request.getproxies, getproxies)
|
|
|
|
# compat.asyncio.events # Must not raise error
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
with self.assertWarns(DeprecationWarning):
|
|
|
|
with self.assertWarns(DeprecationWarning):
|
|
|
|
compat.compat_pycrypto_AES # Must not raise error
|
|
|
|
compat.compat_pycrypto_AES # Must not raise error
|
|
|
|