diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/helper.py | 2 | ||||
-rw-r--r-- | test/test_compat.py | 2 | ||||
-rw-r--r-- | test/test_download.py | 2 | ||||
-rw-r--r-- | test/test_utils.py | 12 | ||||
-rw-r--r-- | test/test_youtube_signature.py | 2 |
5 files changed, 4 insertions, 16 deletions
diff --git a/test/helper.py b/test/helper.py index fb8618120..325f72f0a 100644 --- a/test/helper.py +++ b/test/helper.py @@ -57,7 +57,7 @@ class FakeYDL(YoutubeDL): # 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): diff --git a/test/test_compat.py b/test/test_compat.py index d1a33ddc9..4a7fc3606 100644 --- a/test/test_compat.py +++ b/test/test_compat.py @@ -37,7 +37,7 @@ class TestCompat(unittest.TestCase): all_names = youtube_dl.compat.__all__ present_names = set(filter( lambda c: '_' in c and not c.startswith('_'), - dir(youtube_dl.compat))) + dir(youtube_dl.compat))) - set(['unicode_literals']) self.assertEqual(all_names, sorted(present_names)) if __name__ == '__main__': diff --git a/test/test_download.py b/test/test_download.py index 88ce29871..87aced97c 100644 --- a/test/test_download.py +++ b/test/test_download.py @@ -96,7 +96,7 @@ def generator(test_case): 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): diff --git a/test/test_utils.py b/test/test_utils.py index 338701f4c..e59547784 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -20,7 +20,6 @@ from youtube_dl.utils import ( encodeFilename, find_xpath_attr, fix_xml_ampersands, - get_meta_content, orderedSet, OnDemandPagedList, InAdvancePagedList, @@ -155,17 +154,6 @@ class TestUtil(unittest.TestCase): self.assertEqual(find_xpath_attr(doc, './/node', 'x', 'a'), doc[1]) self.assertEqual(find_xpath_attr(doc, './/node', 'y', 'c'), doc[2]) - def test_meta_parser(self): - testhtml = ''' - <head> - <meta name="description" content="foo & bar"> - <meta content='Plato' name='author'/> - </head> - ''' - get_meta = lambda name: get_meta_content(name, testhtml) - self.assertEqual(get_meta('description'), 'foo & bar') - self.assertEqual(get_meta('author'), 'Plato') - def test_xpath_with_ns(self): testxml = '''<root xmlns:media="http://example.com/"> <media:song> diff --git a/test/test_youtube_signature.py b/test/test_youtube_signature.py index df2cb09f2..13d228cd8 100644 --- a/test/test_youtube_signature.py +++ b/test/test_youtube_signature.py @@ -14,7 +14,7 @@ import re import string from youtube_dl.extractor import YoutubeIE -from youtube_dl.utils import compat_str, compat_urlretrieve +from youtube_dl.compat import compat_str, compat_urlretrieve _TESTS = [ ( |