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