1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-25 03:32:05 +00:00

Beautify test code

This commit is contained in:
Alex Merkel 2020-12-29 16:09:32 +01:00
parent e6abe3f933
commit 796447b1a5
No known key found for this signature in database
GPG key ID: B8F579CC2A6662A2

View file

@ -11,14 +11,17 @@ from test.helper import get_params, try_rm
import youtube_dl.YoutubeDL
from youtube_dl.utils import DownloadError
class YoutubeDL(youtube_dl.YoutubeDL):
def __init__(self, *args, **kwargs):
super(YoutubeDL, self).__init__(*args, **kwargs)
self.to_stderr = self.to_screen
TEST_ID = 'gr51aVj-mLg'
EXPECTED_NAME = 'gr51aVj-mLg'
class TestPostHooks(unittest.TestCase):
def setUp(self):
self.stored_name_1 = None
@ -60,5 +63,6 @@ class TestPostHooks(unittest.TestCase):
for f in self.files:
try_rm(f)
if __name__ == '__main__':
unittest.main()