mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-25 04:02:32 +01:00
skip tests on 5xx status codes
This commit is contained in:
parent
7e7b64162b
commit
2457b71633
@ -9,7 +9,7 @@
|
||||
|
||||
import sys
|
||||
import unittest
|
||||
from gallery_dl import extractor, job, config
|
||||
from gallery_dl import extractor, job, config, exception
|
||||
|
||||
|
||||
class TestExtractors(unittest.TestCase):
|
||||
@ -45,7 +45,16 @@ class TestExtractors(unittest.TestCase):
|
||||
self.assertRaises(result["exception"], tjob.run)
|
||||
return
|
||||
|
||||
try:
|
||||
tjob.run()
|
||||
except exception.HttpError as exc:
|
||||
try:
|
||||
if 500 <= exc.args[0].response.status_code < 600:
|
||||
self.skipTest(exc)
|
||||
except AttributeError as e:
|
||||
pass
|
||||
raise
|
||||
|
||||
if "url" in result:
|
||||
self.assertEqual(result["url"], tjob.hash_url.hexdigest())
|
||||
if "keyword" in result:
|
||||
@ -73,7 +82,6 @@ skip = [
|
||||
"exhentai", "kissmanga", "mangafox", "dynastyscans", "nijie",
|
||||
"archivedmoe", "archiveofsins", "thebarchive",
|
||||
# temporary issues
|
||||
"nyafuu",
|
||||
"mangazuki",
|
||||
]
|
||||
# enable selective testing for direct calls
|
||||
|
Loading…
Reference in New Issue
Block a user