From a5dee01343797828508d215910633efe47434dfa Mon Sep 17 00:00:00 2001 From: bato3 Date: Sat, 28 Jul 2018 01:26:40 +0200 Subject: [PATCH] I have no idea how to write a test that will succeed if extracotr does not match the url. --- youtube_dl/extractor/crunchyroll.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/youtube_dl/extractor/crunchyroll.py b/youtube_dl/extractor/crunchyroll.py index d8051bf12..9c64bb8b7 100644 --- a/youtube_dl/extractor/crunchyroll.py +++ b/youtube_dl/extractor/crunchyroll.py @@ -262,6 +262,9 @@ class CrunchyrollIE(CrunchyrollBaseIE): # Just test metadata extraction 'skip_download': True, }, + }, { + 'url': 'http://www.crunchyroll.com/media-723735', + 'only_matching': True, }] _FORMAT_IDS = { @@ -603,6 +606,13 @@ class CrunchyrollShowPlaylistIE(CrunchyrollBaseIE): 'url': 'http://www.crunchyroll.com/ladies-versus-butlers?skip_wall=1', 'only_matching': True, }] + # Is possible make test, that try URL, and return: This URL is invalid for this extractor + ''' + , { + 'url': 'http://www.crunchyroll.com/media-723735', + 'invalid_url': True, + } + ''' def _real_extract(self, url): show_id = self._match_id(url)