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 sys
|
||||||
import unittest
|
import unittest
|
||||||
from gallery_dl import extractor, job, config
|
from gallery_dl import extractor, job, config, exception
|
||||||
|
|
||||||
|
|
||||||
class TestExtractors(unittest.TestCase):
|
class TestExtractors(unittest.TestCase):
|
||||||
@ -45,7 +45,16 @@ class TestExtractors(unittest.TestCase):
|
|||||||
self.assertRaises(result["exception"], tjob.run)
|
self.assertRaises(result["exception"], tjob.run)
|
||||||
return
|
return
|
||||||
|
|
||||||
tjob.run()
|
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:
|
if "url" in result:
|
||||||
self.assertEqual(result["url"], tjob.hash_url.hexdigest())
|
self.assertEqual(result["url"], tjob.hash_url.hexdigest())
|
||||||
if "keyword" in result:
|
if "keyword" in result:
|
||||||
@ -73,7 +82,6 @@ skip = [
|
|||||||
"exhentai", "kissmanga", "mangafox", "dynastyscans", "nijie",
|
"exhentai", "kissmanga", "mangafox", "dynastyscans", "nijie",
|
||||||
"archivedmoe", "archiveofsins", "thebarchive",
|
"archivedmoe", "archiveofsins", "thebarchive",
|
||||||
# temporary issues
|
# temporary issues
|
||||||
"nyafuu",
|
|
||||||
"mangazuki",
|
"mangazuki",
|
||||||
]
|
]
|
||||||
# enable selective testing for direct calls
|
# enable selective testing for direct calls
|
||||||
|
Loading…
Reference in New Issue
Block a user