diff options
author | dirkf <fieldhouse@gmx.net> | 2023-07-25 00:17:15 +0100 |
---|---|---|
committer | dirkf <fieldhouse@gmx.net> | 2023-07-25 13:19:43 +0100 |
commit | a25e9f3c84a34d43f78a4e5a6f6c2e98e2a0ade3 (patch) | |
tree | 869bde60dab873963705baae5b879b94a4b9c3a9 /test/test_download.py | |
parent | aac33155e40af3da96a2467dd05faea201815989 (diff) |
[compat] Use `compat_open()`
Diffstat (limited to 'test/test_download.py')
-rw-r--r-- | test/test_download.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test_download.py b/test/test_download.py index d50008307..e0bc8cb95 100644 --- a/test/test_download.py +++ b/test/test_download.py @@ -20,15 +20,15 @@ from test.helper import ( import hashlib -import io import json import socket import youtube_dl.YoutubeDL from youtube_dl.compat import ( compat_http_client, - compat_urllib_error, compat_HTTPError, + compat_open as open, + compat_urllib_error, ) from youtube_dl.utils import ( DownloadError, @@ -245,7 +245,7 @@ def generator(test_case, tname): self.assertTrue( os.path.exists(info_json_fn), 'Missing info file %s' % info_json_fn) - with io.open(info_json_fn, encoding='utf-8') as infof: + with open(info_json_fn, encoding='utf-8') as infof: info_dict = json.load(infof) expect_info_dict(self, info_dict, tc.get('info_dict', {})) finally: |