fix skipping tests on 5xx status codes
This commit is contained in:
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import re
|
||||||
import unittest
|
import unittest
|
||||||
from gallery_dl import extractor, job, config, exception
|
from gallery_dl import extractor, job, config, exception
|
||||||
|
|
||||||
@@ -67,11 +68,8 @@ class TestExtractorResults(unittest.TestCase):
|
|||||||
try:
|
try:
|
||||||
tjob.run()
|
tjob.run()
|
||||||
except exception.HttpError as exc:
|
except exception.HttpError as exc:
|
||||||
try:
|
if re.match(r"5\d\d HTTP Error:", str(exc)):
|
||||||
if 500 <= exc.args[0].response.status_code < 600:
|
self.skipTest(exc)
|
||||||
self.skipTest(exc)
|
|
||||||
except AttributeError:
|
|
||||||
pass
|
|
||||||
raise
|
raise
|
||||||
|
|
||||||
# test archive-id uniqueness
|
# test archive-id uniqueness
|
||||||
|
|||||||
Reference in New Issue
Block a user