aboutsummaryrefslogtreecommitdiff
path: root/test/test_youtube_signature.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_youtube_signature.py')
-rw-r--r--test/test_youtube_signature.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/test_youtube_signature.py b/test/test_youtube_signature.py
index 5dcabaf95..f45dfec7c 100644
--- a/test/test_youtube_signature.py
+++ b/test/test_youtube_signature.py
@@ -8,11 +8,14 @@ import sys
import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-import io
import re
import string
-from youtube_dl.compat import compat_str, compat_urlretrieve
+from youtube_dl.compat import (
+ compat_open as open,
+ compat_str,
+ compat_urlretrieve,
+)
from test.helper import FakeYDL
from youtube_dl.extractor import YoutubeIE
@@ -208,7 +211,7 @@ def t_factory(name, sig_func, url_pattern):
if not os.path.exists(fn):
compat_urlretrieve(url, fn)
- with io.open(fn, encoding='utf-8') as testf:
+ with open(fn, encoding='utf-8') as testf:
jscode = testf.read()
self.assertEqual(sig_func(jscode, sig_input), expected_sig)