summaryrefslogtreecommitdiffstats
path: root/test/test_extractor.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2024-08-03 20:27:44 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2024-08-03 20:27:44 -0400
commit032e5bed275a253e122ed9ac86dac7b8c4204172 (patch)
treeb4eda52ebfe00c4d22e9d633b1ab2d158a9f0573 /test/test_extractor.py
parent80e39a8fc7de105510cbbdca8507f2a4b8c9e01d (diff)
New upstream version 1.27.2.upstream/1.27.2
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)