mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-22 10:42:34 +01:00
skip tests on read timeouts; print list of skipped tests
This commit is contained in:
parent
1c36e65e9b
commit
6a34f4b0c1
@ -46,8 +46,8 @@ class PahealTagExtractor(PahealExtractor):
|
||||
pattern = (r"(?:https?://)?(?:rule34|rule63|cosplay)\.paheal\.net"
|
||||
r"/post/list/([^/?&#]+)")
|
||||
test = ("https://rule34.paheal.net/post/list/k-on/1", {
|
||||
"url": "0f5a777cea524635760de32dd85a3de5ac5f3f43",
|
||||
"keyword": "4cb563a2bdcb443e1087aa11eb0f7add03aa8bd2",
|
||||
"url": "69351072a4d4aba9fc76c6f5defd7b0800550a12",
|
||||
"keyword": "327b8216cdd0347562ca502c6301928129e4e0d0",
|
||||
})
|
||||
per_page = 70
|
||||
|
||||
|
@ -26,6 +26,7 @@ TRAVIS_SKIP = {
|
||||
|
||||
# temporary issues, etc.
|
||||
BROKEN = {
|
||||
"fallenangels",
|
||||
"mangapark",
|
||||
"simplyhentai",
|
||||
}
|
||||
@ -39,6 +40,17 @@ class TestExtractorResults(unittest.TestCase):
|
||||
def tearDown(self):
|
||||
config.clear()
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
cls._skipped = []
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
if cls._skipped:
|
||||
print("\n\nSkipped tests:")
|
||||
for url, exc in cls._skipped:
|
||||
print('- {} ("{}")'.format(url, exc))
|
||||
|
||||
def _run_test(self, extr, url, result):
|
||||
if result:
|
||||
if "options" in result:
|
||||
@ -65,7 +77,10 @@ class TestExtractorResults(unittest.TestCase):
|
||||
except exception.StopExtraction:
|
||||
pass
|
||||
except exception.HttpError as exc:
|
||||
if re.match(r"5\d\d: ", str(exc)):
|
||||
exc = str(exc)
|
||||
if re.match(r"5\d\d: ", exc) or \
|
||||
re.search(r"\bRead timed out\b", exc):
|
||||
self._skipped.append((url, exc))
|
||||
self.skipTest(exc)
|
||||
raise
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user