diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-08-02 03:46:45 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-08-02 03:47:31 +0530 |
commit | 0855702f3f3855974609cf3e99334de0d5d166e3 (patch) | |
tree | 17d822fdcf9b0e140c1008a19c4d047ae3a015c8 /test/test_download.py | |
parent | e8384376c029f071927dafb6f8debb7e3eb847c2 (diff) | |
download | hypervideo-pre-0855702f3f3855974609cf3e99334de0d5d166e3.tar.lz hypervideo-pre-0855702f3f3855974609cf3e99334de0d5d166e3.tar.xz hypervideo-pre-0855702f3f3855974609cf3e99334de0d5d166e3.zip |
[test:download] Support testing with `ignore_no_formats_error`
Diffstat (limited to 'test/test_download.py')
-rw-r--r-- | test/test_download.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/test_download.py b/test/test_download.py index e4485ce81..546748454 100644 --- a/test/test_download.py +++ b/test/test_download.py @@ -108,8 +108,13 @@ def generator(test_case, tname): for tc in test_cases: info_dict = tc.get('info_dict', {}) - if not (info_dict.get('id') and info_dict.get('ext')): - raise Exception('Test definition incorrect. The output file cannot be known. Are both \'id\' and \'ext\' keys present?') + params = tc.get('params', {}) + if not info_dict.get('id'): + raise Exception('Test definition incorrect. \'id\' key is not present') + elif not info_dict.get('ext'): + if params.get('skip_download') and params.get('ignore_no_formats_error'): + continue + raise Exception('Test definition incorrect. The output file cannot be known. \'ext\' key is not present') if 'skip' in test_case: print_skipping(test_case['skip']) |