From 87c82b2b3d998375196a081ae589be4cd4c7e642 Mon Sep 17 00:00:00 2001 From: Petr Novak Date: Sat, 4 Nov 2017 23:25:16 +0100 Subject: [PATCH] [test/test_download] In test we download 10000 bytes at max Also removed workaround in seznamzpravy extractor test. --- test/test_download.py | 2 +- youtube_dl/extractor/seznamzpravy.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/test/test_download.py b/test/test_download.py index 209f5f6d6..0513b6731 100644 --- a/test/test_download.py +++ b/test/test_download.py @@ -216,7 +216,7 @@ def generator(test_case, tname): expected_minsize = tc.get('file_minsize', 10000) if expected_minsize is not None: if params.get('test'): - expected_minsize = max(expected_minsize, 10000) + expected_minsize = min(expected_minsize, 10000) got_fsize = os.path.getsize(tc_filename) assertGreaterEqual( self, got_fsize, expected_minsize, diff --git a/youtube_dl/extractor/seznamzpravy.py b/youtube_dl/extractor/seznamzpravy.py index 66edd13aa..6bcc767d4 100644 --- a/youtube_dl/extractor/seznamzpravy.py +++ b/youtube_dl/extractor/seznamzpravy.py @@ -16,9 +16,7 @@ class SeznamZpravyIE(InfoExtractor): _TESTS = [{ # two videos on one page, with SDN URL 'url': 'https://www.seznam.cz/zpravy/clanek/jejich-svet-na-nas-utoci-je-lepsi-branit-se-na-jejich-pisecku-rika-reziser-a-major-v-zaloze-marhoul-35990', - 'params': {'skip_download': True}, - # ^ this is here instead of 'file_minsize': 1586, which does not work because - # test_download.py forces expected_minsize to at least 10k when test is running + 'file_minsize': 1586, 'info_dict': { 'id': '35990', 'ext': 'mp4',