From 6d15be8b2c9f57aa0081a5d999e8f79a297cc422 Mon Sep 17 00:00:00 2001 From: Tobias Gruetzmacher Date: Fri, 2 Apr 2021 10:15:18 +0200 Subject: [PATCH] Ignore MangaDex in tests for now --- tests/modules/conftest.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/modules/conftest.py b/tests/modules/conftest.py index 81dd388eb..04eb7d8d1 100644 --- a/tests/modules/conftest.py +++ b/tests/modules/conftest.py @@ -13,11 +13,12 @@ from dosagelib.scraper import scrapers def get_test_scrapers(): """Return scrapers that should be tested.""" - if "TESTALL" in os.environ: + if 'TESTALL' in os.environ: # test all comics (this will take some time) - return scrapers.get() - if 'TESTCOMICS' in os.environ: - scraper_pattern = re.compile(os.environ['TESTCOMICS']) + # ignore mangadex for now (site is temporary down) + scraper_pattern = '^(?!MangaDex)' + elif 'TESTCOMICS' in os.environ: + scraper_pattern = os.environ['TESTCOMICS'] else: # Get limited number of scraper tests as default testscrapernames = [ @@ -28,11 +29,12 @@ def get_test_scrapers(): # _WordPressScraper 'GrrlPower', ] - scraper_pattern = re.compile('^(' + '|'.join(testscrapernames) + ')$') + scraper_pattern = '^(' + '|'.join(testscrapernames) + ')$' + matcher = re.compile(scraper_pattern) return [ scraperobj for scraperobj in scrapers.get() - if scraper_pattern.match(scraperobj.name) + if matcher.match(scraperobj.name) ]