aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_extractor.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2024-08-03 20:27:50 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2024-08-03 20:27:50 -0400
commitad105563ff9e1e82b0714d9bf2de8e8247a96512 (patch)
tree9ce5d2ef148ba3caad5171b79e7a7cd051977dd2 /test/test_extractor.py
parentdd947614238f176637b2518ee24e588ca5920dea (diff)
parent032e5bed275a253e122ed9ac86dac7b8c4204172 (diff)
Update upstream source from tag 'upstream/1.27.2'
Update to upstream version '1.27.2' with Debian dir 30ac047f32a7127d1f2b2198647d93f92db9f287
Diffstat (limited to 'test/test_extractor.py')
-rw-r--r--test/test_extractor.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/test_extractor.py b/test/test_extractor.py
index 6af1226..abf122b 100644
--- a/test/test_extractor.py
+++ b/test/test_extractor.py
@@ -17,7 +17,7 @@ import string
from datetime import datetime, timedelta
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from gallery_dl import extractor # noqa E402
+from gallery_dl import extractor, util # noqa E402
from gallery_dl.extractor import mastodon # noqa E402
from gallery_dl.extractor.common import Extractor, Message # noqa E402
from gallery_dl.extractor.directlink import DirectlinkExtractor # noqa E402
@@ -25,7 +25,11 @@ from gallery_dl.extractor.directlink import DirectlinkExtractor # noqa E402
_list_classes = extractor._list_classes
try:
- from test import results
+ RESULTS = os.environ.get("GDL_TEST_RESULTS")
+ if RESULTS:
+ results = util.import_file(RESULTS)
+ else:
+ from test import results
except ImportError:
results = None
@@ -109,6 +113,7 @@ class TestExtractorModule(unittest.TestCase):
print("Skipping '{}' category checks".format(cat))
continue
raise
+ self.assertTrue(extr, url)
self.assertEqual(extr.category, cat, url)
self.assertEqual(extr.subcategory, sub, url)
self.assertEqual(extr.basecategory, base, url)