mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-07 20:30:41 -05:00
[tests] Don't auto init YoutubeDL
It would print the debug headers for each test. And nose uses a StringIO object for stdout, which in python 2.x doesn't have the 'encoding' attribute.
This commit is contained in:
parent
42f7d2f588
commit
ac35c26686
2 changed files with 2 additions and 2 deletions
|
@ -57,7 +57,7 @@ def __init__(self, override=None):
|
|||
# Different instances of the downloader can't share the same dictionary
|
||||
# some test set the "sublang" parameter, which would break the md5 checks.
|
||||
params = get_params(override=override)
|
||||
super(FakeYDL, self).__init__(params)
|
||||
super(FakeYDL, self).__init__(params, auto_init=False)
|
||||
self.result = []
|
||||
|
||||
def to_screen(self, s, skip_eol=None):
|
||||
|
|
|
@ -96,7 +96,7 @@ def print_skipping(reason):
|
|||
params.setdefault('extract_flat', True)
|
||||
params.setdefault('skip_download', True)
|
||||
|
||||
ydl = YoutubeDL(params)
|
||||
ydl = YoutubeDL(params, auto_init=False)
|
||||
ydl.add_default_info_extractors()
|
||||
finished_hook_called = set()
|
||||
def _hook(status):
|
||||
|
|
Loading…
Reference in a new issue