[tests] add support for skipping an extractor result test
This commit is contained in:
@@ -372,6 +372,7 @@ __tests__ = (
|
||||
{
|
||||
"#url" : "https://sankaku.app/post/show/20758561",
|
||||
"#comment" : "empty tags (#1617)",
|
||||
"#skip" : "legacy, now unsupported, numerical post ID",
|
||||
"#category": ("booru", "sankaku", "post"),
|
||||
"#class" : sankaku.SankakuPostExtractor,
|
||||
"#options" : {"tags": True},
|
||||
|
||||
@@ -106,6 +106,10 @@ class TestExtractorResults(unittest.TestCase):
|
||||
if len(result) <= 2:
|
||||
return # only matching
|
||||
|
||||
skip = result.pop("#skip", False)
|
||||
if skip:
|
||||
return self._skipped.append((result["#url"], skip))
|
||||
|
||||
if auth is None:
|
||||
auth = (cat in AUTH_REQUIRED)
|
||||
elif not auth:
|
||||
|
||||
Reference in New Issue
Block a user