self.to_stderr = self.to_screen
self.processed_info_dicts = []
return youtube_dl.FileDownloader.__init__(self, *args, **kwargs)
+ def report_warning(self, message):
+ # Don't accept warnings during tests
+ raise ExtractorError(message)
def process_info(self, info_dict):
self.processed_info_dicts.append(info_dict)
return youtube_dl.FileDownloader.process_info(self, info_dict)
class TestDownload(unittest.TestCase):
+ maxDiff = None
def setUp(self):
self.parameters = parameters
self.defs = defs
def generator(test_case):
def test_template(self):
- ie = getattr(youtube_dl.InfoExtractors, test_case['name'] + 'IE')
+ ie = youtube_dl.InfoExtractors.get_info_extractor(test_case['name'])
if not ie._WORKING:
print('Skipping: IE marked as not _WORKING')
return
if retry == RETRIES: raise
# Check if the exception is not a network related one
- if not err.exc_info[0] in (ZeroDivisionError, compat_urllib_error.URLError, socket.timeout):
+ if not err.exc_info[0] in (compat_urllib_error.URLError, socket.timeout, UnavailableVideoError):
raise
print('Retrying: {0} failed tries\n\n##########\n\n'.format(retry))