aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_YoutubeDLCookieJar.py
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2022-05-17 10:10:39 +0800
committerJesús <heckyel@hyperbola.info>2022-05-17 10:10:39 +0800
commit4bbf329feb5a820ac21269fa426c95ca14d7af25 (patch)
tree2c147a162b4bddc7862ed5895f1f66edd9a675e8 /test/test_YoutubeDLCookieJar.py
parente21342911839b7796a5c788a7c3f13b06d975c64 (diff)
parent5faf6528fb701724ac32e0a487f92281c7800bda (diff)
downloadhypervideo-pre-4bbf329feb5a820ac21269fa426c95ca14d7af25.tar.lz
hypervideo-pre-4bbf329feb5a820ac21269fa426c95ca14d7af25.tar.xz
hypervideo-pre-4bbf329feb5a820ac21269fa426c95ca14d7af25.zip
updated from upstream | 17/05/2022 at 10:10
Diffstat (limited to 'test/test_YoutubeDLCookieJar.py')
-rw-r--r--test/test_YoutubeDLCookieJar.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/test/test_YoutubeDLCookieJar.py b/test/test_YoutubeDLCookieJar.py
index c514413a4..6280e1f2c 100644
--- a/test/test_YoutubeDLCookieJar.py
+++ b/test/test_YoutubeDLCookieJar.py
@@ -1,13 +1,10 @@
#!/usr/bin/env python3
-# coding: utf-8
-
-from __future__ import unicode_literals
-
import os
import re
import sys
import tempfile
import unittest
+
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from yt_dlp.utils import YoutubeDLCookieJar
@@ -20,7 +17,7 @@ class TestYoutubeDLCookieJar(unittest.TestCase):
tf = tempfile.NamedTemporaryFile(delete=False)
try:
cookiejar.save(filename=tf.name, ignore_discard=True, ignore_expires=True)
- temp = tf.read().decode('utf-8')
+ temp = tf.read().decode()
self.assertTrue(re.search(
r'www\.foobar\.foobar\s+FALSE\s+/\s+TRUE\s+0\s+YoutubeDLExpiresEmpty\s+YoutubeDLExpiresEmptyValue', temp))
self.assertTrue(re.search(