From f9ded38d896ba687126c0d4b4e38dfebf9e0b3cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Wed, 15 Aug 2018 20:41:53 +0200 Subject: [PATCH] [test:results] add support for "range" options in tests --- test/test_results.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/test/test_results.py b/test/test_results.py index 6a57c6c8..aa320865 100644 --- a/test/test_results.py +++ b/test/test_results.py @@ -14,7 +14,7 @@ import unittest from gallery_dl import extractor, job, config, exception -# these don't work on travis-ci +# these don't work on Travis CI TRAVIS_SKIP = { "exhentai", "kissmanga", "mangafox", "dynastyscans", "nijie", "archivedmoe", "archiveofsins", "thebarchive", "fireden", @@ -23,8 +23,9 @@ TRAVIS_SKIP = { # temporary issues, etc. BROKEN = { - "imagefap", # gallery flagged and unavailable - "rbt", # cert expired + "desuarchive", # down + "imagefap", # gallery flagged and unavailable + "rbt", # down "subapics", } @@ -55,6 +56,8 @@ class TestExtractorResults(unittest.TestCase): if "options" in result: for key, value in result["options"]: config.set(key.split("."), value) + if "range" in result: + config.set(("_", "image", "range"), (result["range"],)) content = "content" in result else: content = False @@ -67,9 +70,10 @@ class TestExtractorResults(unittest.TestCase): if "exception" in result: self.assertRaises(result["exception"], tjob.run) return - try: tjob.run() + except exception.StopExtraction: + pass except exception.HttpError as exc: if re.match(r"5\d\d HTTP Error:", str(exc)): self.skipTest(exc)