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