[tests/results] replace 'datetime' usage
test for 'dt:…' to catch NullDatetime instances, which inherit from 'datetime.datetime' but are not exactly this class
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
|
||||
gallery_dl = __import__("gallery_dl.extractor.2chen")
|
||||
_2chen = getattr(gallery_dl.extractor, "2chen")
|
||||
import datetime
|
||||
|
||||
|
||||
__tests__ = (
|
||||
@@ -18,7 +17,7 @@ __tests__ = (
|
||||
"#count" : ">= 179",
|
||||
|
||||
"board" : "tv",
|
||||
"date" : datetime.datetime,
|
||||
"date" : "type:datetime",
|
||||
"hash" : r"re:[0-9a-f]{40}",
|
||||
"name" : "Anonymous",
|
||||
"no" : r"re:\d+",
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
gallery_dl = __import__("gallery_dl.extractor.4archive")
|
||||
_4archive = getattr(gallery_dl.extractor, "4archive")
|
||||
import datetime
|
||||
|
||||
|
||||
__tests__ = (
|
||||
@@ -19,7 +18,7 @@ __tests__ = (
|
||||
|
||||
"board" : "u",
|
||||
"com" : str,
|
||||
"date" : datetime.datetime,
|
||||
"date" : "type:datetime",
|
||||
"name" : "Anonymous",
|
||||
"no" : range(2397221, 2418158),
|
||||
"thread": 2397221,
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
# published by the Free Software Foundation.
|
||||
|
||||
from gallery_dl.extractor import deviantart
|
||||
import datetime
|
||||
from gallery_dl import exception
|
||||
|
||||
|
||||
@@ -60,7 +59,7 @@ __tests__ = (
|
||||
"transparency": bool,
|
||||
"width" : int,
|
||||
},
|
||||
"date" : datetime.datetime,
|
||||
"date" : "type:datetime",
|
||||
"deviationid" : str,
|
||||
"?download_filesize": int,
|
||||
"extension" : str,
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
from gallery_dl.extractor import facebook
|
||||
from gallery_dl import exception
|
||||
import datetime
|
||||
|
||||
|
||||
__tests__ = (
|
||||
@@ -191,7 +190,7 @@ __tests__ = (
|
||||
"#count" : 1,
|
||||
|
||||
"caption" : "They were on a break... #FriendsReunion #MoreTogether",
|
||||
"date" : datetime.datetime(2021, 5, 27, 21, 55, 19),
|
||||
"date" : "dt:2021-05-27 21:55:19",
|
||||
"filename" : "191053255_10160743390471729_9001965649022744000_n",
|
||||
"extension": "jpg",
|
||||
"id" : "10160743390456729",
|
||||
@@ -212,7 +211,7 @@ __tests__ = (
|
||||
"#count" : 1,
|
||||
|
||||
"caption" : "",
|
||||
"date" : datetime.datetime(2014, 5, 3, 0, 44, 47),
|
||||
"date" : "dt:2014-05-03 00:44:47",
|
||||
"filename" : str,
|
||||
"extension": "png",
|
||||
"id" : "10152716011076729",
|
||||
@@ -272,7 +271,7 @@ __tests__ = (
|
||||
"#class" : facebook.FacebookVideoExtractor,
|
||||
"#count" : 1,
|
||||
|
||||
"date" : datetime.datetime(2024, 4, 19, 17, 25, 48),
|
||||
"date" : "dt:2024-04-19 17:25:48",
|
||||
"filename" : str,
|
||||
"id" : "1165557851291824",
|
||||
"url" : str,
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
# published by the Free Software Foundation.
|
||||
|
||||
from gallery_dl.extractor import hentaifoundry
|
||||
import datetime
|
||||
|
||||
|
||||
__tests__ = (
|
||||
@@ -190,7 +189,7 @@ Sorry for the bad quality, I made it on after effect because Flash works like sh
|
||||
"author" : "SnowWolf35",
|
||||
"chapters" : int,
|
||||
"comments" : int,
|
||||
"date" : datetime.datetime,
|
||||
"date" : "type:datetime",
|
||||
"description": str,
|
||||
"index" : int,
|
||||
"rating" : int,
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
# published by the Free Software Foundation.
|
||||
|
||||
from gallery_dl.extractor import nijie
|
||||
import datetime
|
||||
|
||||
|
||||
__tests__ = (
|
||||
@@ -29,7 +28,7 @@ __tests__ = (
|
||||
|
||||
"artist_id" : 58000,
|
||||
"artist_name": "のえるわ",
|
||||
"date" : datetime.datetime,
|
||||
"date" : "type:datetime",
|
||||
"description": str,
|
||||
"image_id" : int,
|
||||
"num" : int,
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
from gallery_dl.extractor import imgur
|
||||
from gallery_dl import exception
|
||||
import datetime
|
||||
|
||||
|
||||
__tests__ = (
|
||||
@@ -215,7 +214,7 @@ __tests__ = (
|
||||
},
|
||||
"account_id" : 0,
|
||||
"count" : 19,
|
||||
"date" : datetime.datetime,
|
||||
"date" : "type:datetime",
|
||||
"description": "",
|
||||
"ext" : "jpg",
|
||||
"has_sound" : False,
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
# published by the Free Software Foundation.
|
||||
|
||||
from gallery_dl.extractor import inkbunny
|
||||
import datetime
|
||||
|
||||
|
||||
__tests__ = (
|
||||
@@ -16,7 +15,7 @@ __tests__ = (
|
||||
"#pattern" : r"https://[\w.]+\.metapix\.net/files/full/\d+/\d+_soina_.+",
|
||||
"#range" : "20-50",
|
||||
|
||||
"date" : datetime.datetime,
|
||||
"date" : "type:datetime",
|
||||
"deleted" : bool,
|
||||
"file_id" : r"re:[0-9]+",
|
||||
"filename" : r"re:[0-9]+_soina_\w+",
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
# published by the Free Software Foundation.
|
||||
|
||||
from gallery_dl.extractor import luscious
|
||||
import datetime
|
||||
from gallery_dl import exception
|
||||
|
||||
|
||||
@@ -49,7 +48,7 @@ __tests__ = (
|
||||
"aspect_ratio" : r"re:\d+:\d+",
|
||||
"category" : "luscious",
|
||||
"created" : int,
|
||||
"date" : datetime.datetime,
|
||||
"date" : "type:datetime",
|
||||
"height" : int,
|
||||
"id" : int,
|
||||
"is_animated" : False,
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
from gallery_dl.extractor import mangadex
|
||||
from gallery_dl import exception
|
||||
import datetime
|
||||
|
||||
|
||||
__tests__ = (
|
||||
@@ -132,7 +131,7 @@ __tests__ = (
|
||||
"chapter" : 0,
|
||||
"chapter_minor": "",
|
||||
"chapter_id" : str,
|
||||
"date" : datetime.datetime,
|
||||
"date" : "type:datetime",
|
||||
"lang" : "iso:lang",
|
||||
"artist" : ["Arakawa Hiromu"],
|
||||
"author" : ["Arakawa Hiromu"],
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
# published by the Free Software Foundation.
|
||||
|
||||
from gallery_dl.extractor import mangafox
|
||||
import datetime
|
||||
|
||||
|
||||
__tests__ = (
|
||||
@@ -40,7 +39,7 @@ __tests__ = (
|
||||
"chapter" : int,
|
||||
"chapter_minor" : r"re:^(\.\d+)?$",
|
||||
"chapter_string": r"re:(v\d+/)?c\d+",
|
||||
"date" : datetime.datetime,
|
||||
"date" : "type:datetime",
|
||||
"description" : "High school boy Naoya gets a confession from Momi, a cute and friendly girl. However, Naoya already has a girlfriend, Seki... but Momi is too good a catch to let go. Momi and Nagoya's goal becomes clear: convince Seki to accept being an item with the two of them. Will she budge?",
|
||||
"lang" : "en",
|
||||
"language" : "English",
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
# published by the Free Software Foundation.
|
||||
|
||||
from gallery_dl.extractor import mangapark
|
||||
import datetime
|
||||
|
||||
|
||||
__tests__ = (
|
||||
@@ -115,7 +114,7 @@ __tests__ = (
|
||||
"chapter" : int,
|
||||
"chapter_id" : r"re:\d+",
|
||||
"chapter_minor": str,
|
||||
"date" : datetime.datetime,
|
||||
"date" : "type:datetime",
|
||||
"lang" : "en",
|
||||
"language" : "English",
|
||||
"manga_id" : 114972,
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
# published by the Free Software Foundation.
|
||||
|
||||
from gallery_dl.extractor import nijie
|
||||
import datetime
|
||||
from gallery_dl import exception
|
||||
|
||||
|
||||
@@ -32,7 +31,7 @@ __tests__ = (
|
||||
"artist_id" : 44,
|
||||
"artist_name": "ED",
|
||||
"count" : 1,
|
||||
"date" : datetime.datetime,
|
||||
"date" : "type:datetime",
|
||||
"description": str,
|
||||
"extension" : "jpg",
|
||||
"filename" : str,
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
# published by the Free Software Foundation.
|
||||
|
||||
from gallery_dl.extractor import patreon
|
||||
import datetime
|
||||
from gallery_dl import exception
|
||||
|
||||
|
||||
@@ -21,7 +20,7 @@ __tests__ = (
|
||||
"comment_count": int,
|
||||
"content" : str,
|
||||
"creator" : dict,
|
||||
"date" : datetime.datetime,
|
||||
"date" : "type:datetime",
|
||||
"id" : int,
|
||||
"images" : list,
|
||||
"like_count" : int,
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
# published by the Free Software Foundation.
|
||||
|
||||
from gallery_dl.extractor import photovogue
|
||||
import datetime
|
||||
|
||||
|
||||
__tests__ = (
|
||||
@@ -21,7 +20,7 @@ __tests__ = (
|
||||
"#class" : photovogue.PhotovogueUserExtractor,
|
||||
"#pattern" : "https://images.vogue.it/Photovogue/[^/]+_gallery.jpg",
|
||||
|
||||
"date" : datetime.datetime,
|
||||
"date" : "type:datetime",
|
||||
"favorite_count" : int,
|
||||
"favorited" : list,
|
||||
"id" : int,
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
# published by the Free Software Foundation.
|
||||
|
||||
from gallery_dl.extractor import picarto
|
||||
import datetime
|
||||
|
||||
|
||||
__tests__ = (
|
||||
@@ -16,7 +15,7 @@ __tests__ = (
|
||||
"#pattern" : r"https://images\.picarto\.tv/gallery/\d/\d\d/\d+/artwork/[0-9a-f-]+/large-[0-9a-f]+\.(jpg|png|gif)",
|
||||
"#count" : ">= 7",
|
||||
|
||||
"date": datetime.datetime,
|
||||
"date": "type:datetime",
|
||||
},
|
||||
|
||||
)
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
# published by the Free Software Foundation.
|
||||
|
||||
from gallery_dl.extractor import pillowfort
|
||||
import datetime
|
||||
|
||||
|
||||
__tests__ = (
|
||||
@@ -24,7 +23,7 @@ __tests__ = (
|
||||
"content" : str,
|
||||
"count" : 4,
|
||||
"created_at" : str,
|
||||
"date" : datetime.datetime,
|
||||
"date" : "type:datetime",
|
||||
"deleted" : None,
|
||||
"deleted_at" : None,
|
||||
"deleted_by_mod" : None,
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
# published by the Free Software Foundation.
|
||||
|
||||
from gallery_dl.extractor import pixeldrain
|
||||
import datetime
|
||||
|
||||
__tests__ = (
|
||||
{
|
||||
@@ -81,7 +80,7 @@ __tests__ = (
|
||||
"success" : True,
|
||||
"title" : "アルバム",
|
||||
},
|
||||
"date" : datetime.datetime,
|
||||
"date" : "type:datetime",
|
||||
"description": "",
|
||||
"detail_href": r"re:/file/(yEK1n2Qc|jW9E6s4h)/info",
|
||||
"hash_sha256": r"re:\w{64}",
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
# published by the Free Software Foundation.
|
||||
|
||||
from gallery_dl.extractor import subscribestar
|
||||
import datetime
|
||||
|
||||
|
||||
__tests__ = (
|
||||
@@ -20,7 +19,7 @@ __tests__ = (
|
||||
"author_name": "subscribestar",
|
||||
"author_nick": "SubscribeStar",
|
||||
"content" : str,
|
||||
"date" : datetime.datetime,
|
||||
"date" : "type:datetime",
|
||||
"id" : int,
|
||||
"num" : int,
|
||||
"post_id" : int,
|
||||
@@ -38,7 +37,7 @@ __tests__ = (
|
||||
"#options" : {"metadata": True},
|
||||
"#range" : "1",
|
||||
|
||||
"date": datetime.datetime,
|
||||
"date": "type:datetime",
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
# published by the Free Software Foundation.
|
||||
|
||||
from gallery_dl.extractor import toyhouse
|
||||
import datetime
|
||||
|
||||
|
||||
__tests__ = (
|
||||
@@ -19,7 +18,7 @@ __tests__ = (
|
||||
|
||||
"artists" : list,
|
||||
"characters": list,
|
||||
"date" : datetime.datetime,
|
||||
"date" : "type:datetime",
|
||||
"hash" : r"re:\w+",
|
||||
"id" : r"re:\d+",
|
||||
"url" : str,
|
||||
|
||||
Reference in New Issue
Block a user