summaryrefslogtreecommitdiffstats
path: root/test/test_results.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_results.py')
-rw-r--r--test/test_results.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/test/test_results.py b/test/test_results.py
index e87b4b8..538abfa 100644
--- a/test/test_results.py
+++ b/test/test_results.py
@@ -12,6 +12,7 @@ import sys
import re
import json
import hashlib
+import datetime
import unittest
from gallery_dl import extractor, util, job, config, exception
@@ -21,14 +22,17 @@ TRAVIS_SKIP = {
"exhentai", "kissmanga", "mangafox", "dynastyscans", "nijie", "bobx",
"archivedmoe", "archiveofsins", "thebarchive", "fireden", "4plebs",
"sankaku", "idolcomplex", "mangahere", "readcomiconline", "mangadex",
- "sankakucomplex", "warosu", "fuskator", "patreon",
+ "sankakucomplex", "warosu", "fuskator", "patreon", "komikcast",
}
# temporary issues, etc.
BROKEN = {
- "imxto",
+ "35photo",
"mangapark",
"photobucket",
+ "sexcom",
+ "hentaicafe",
+ "worldthree",
}
@@ -154,6 +158,9 @@ class TestExtractorResults(unittest.TestCase):
elif isinstance(test, str):
if test.startswith("re:"):
self.assertRegex(value, test[3:], msg=key)
+ elif test.startswith("dt:"):
+ self.assertIsInstance(value, datetime.datetime, msg=key)
+ self.assertEqual(str(value), test[3:], msg=key)
elif test.startswith("type:"):
self.assertEqual(type(value).__name__, test[5:], msg=key)
else:
@@ -267,7 +274,7 @@ class TestFormatter(util.Formatter):
return ""
def _apply_simple(self, key, fmt):
- if key == "extension" or "._format_optional." in repr(fmt):
+ if key == "extension" or "._parse_optional." in repr(fmt):
return self._noop
def wrap(obj):
@@ -275,7 +282,7 @@ class TestFormatter(util.Formatter):
return wrap
def _apply(self, key, funcs, fmt):
- if key == "extension" or "._format_optional." in repr(fmt):
+ if key == "extension" or "._parse_optional." in repr(fmt):
return self._noop
def wrap(obj):
@@ -301,6 +308,7 @@ def setup_test_config():
config.set(("extractor", "nijie") , "username", email)
config.set(("extractor", "seiga") , "username", email)
config.set(("extractor", "danbooru") , "username", None)
+ config.set(("extractor", "e621") , "username", None)
config.set(("extractor", "instagram") , "username", None)
config.set(("extractor", "twitter") , "username", None)