From 3ac8f703bd22f6506ea67544709bee9c664f76f7 Mon Sep 17 00:00:00 2001 From: Tobias Gruetzmacher Date: Sat, 26 Sep 2020 23:08:00 +0200 Subject: [PATCH] Make URL differences non-fatal in module tests --- tests/modules/check_comics.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/modules/check_comics.py b/tests/modules/check_comics.py index ba63699e3..a8363e66a 100644 --- a/tests/modules/check_comics.py +++ b/tests/modules/check_comics.py @@ -4,6 +4,7 @@ # Copyright (C) 2015-2020 Tobias Gruetzmacher import re import multiprocessing +import warnings from urllib.parse import urlsplit @@ -106,6 +107,6 @@ def _check_stripurl(strip, scraperobj): urlmatch = ARCHIVE_ORG_MATCH.sub(r'/\\d+/', urlmatch) ro = re.compile(urlmatch) mo = ro.match(strip.strip_url) - err = 'strip URL {!r} does not match stripUrl pattern {}'.format( - strip.strip_url, urlmatch) - assert mo is not None, err + if not mo: + warnings.warn('strip URL {!r} does not match stripUrl pattern {}'.format( + strip.strip_url, urlmatch))