aboutsummaryrefslogtreecommitdiff
path: root/test/helper.py
diff options
context:
space:
mode:
authordirkf <fieldhouse@gmx.net>2023-07-25 00:17:15 +0100
committerdirkf <fieldhouse@gmx.net>2023-07-25 13:19:43 +0100
commita25e9f3c84a34d43f78a4e5a6f6c2e98e2a0ade3 (patch)
tree869bde60dab873963705baae5b879b94a4b9c3a9 /test/helper.py
parentaac33155e40af3da96a2467dd05faea201815989 (diff)
[compat] Use `compat_open()`
Diffstat (limited to 'test/helper.py')
-rw-r--r--test/helper.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/helper.py b/test/helper.py
index aa99001b2..fc55c6b46 100644
--- a/test/helper.py
+++ b/test/helper.py
@@ -1,7 +1,6 @@
from __future__ import unicode_literals
import errno
-import io
import hashlib
import json
import os.path
@@ -14,6 +13,7 @@ import unittest
import youtube_dl.extractor
from youtube_dl import YoutubeDL
from youtube_dl.compat import (
+ compat_open as open,
compat_os_name,
compat_str,
)
@@ -29,10 +29,10 @@ def get_params(override=None):
"parameters.json")
LOCAL_PARAMETERS_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)),
"local_parameters.json")
- with io.open(PARAMETERS_FILE, encoding='utf-8') as pf:
+ with open(PARAMETERS_FILE, encoding='utf-8') as pf:
parameters = json.load(pf)
if os.path.exists(LOCAL_PARAMETERS_FILE):
- with io.open(LOCAL_PARAMETERS_FILE, encoding='utf-8') as pf:
+ with open(LOCAL_PARAMETERS_FILE, encoding='utf-8') as pf:
parameters.update(json.load(pf))
if override:
parameters.update(override)