aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorFilippo Valsorda <filippo.valsorda@gmail.com>2013-06-07 11:19:27 +0200
committerFilippo Valsorda <filippo.valsorda@gmail.com>2013-06-07 12:46:23 +0200
commitbe95cac157a75da1a0fa512b36eb90bc2c28cc96 (patch)
treec133d571dfa5a253002f1baaaf16e741e1e0d3cf /test
parent476203d025dd2619ea9f9e2f99ffce507dec6596 (diff)
raise exceptions on warnings during tests - and solve a couple of them
Diffstat (limited to 'test')
-rw-r--r--test/test_download.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/test/test_download.py b/test/test_download.py
index 3e6bdd44e..565b1ebc5 100644
--- a/test/test_download.py
+++ b/test/test_download.py
@@ -40,18 +40,12 @@ def _try_rm(filename):
class FileDownloader(youtube_dl.FileDownloader):
def __init__(self, *args, **kwargs):
- self._to_stderr = self.to_stderr
self.to_stderr = self.to_screen
self.processed_info_dicts = []
return youtube_dl.FileDownloader.__init__(self, *args, **kwargs)
def report_warning(self, message):
- # let warnings pass to output
- if sys.stderr.isatty() and os.name != 'nt':
- _msg_header=u'\033[0;33mWARNING:\033[0m'
- else:
- _msg_header=u'WARNING:'
- warning_message=u'%s %s' % (_msg_header,message)
- self._to_stderr(warning_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)