[scripts/init] add '--no-test' option
This commit is contained in:
@@ -32,13 +32,15 @@ LICENSE = """\
|
|||||||
def init_extractor(args):
|
def init_extractor(args):
|
||||||
category = args.category
|
category = args.category
|
||||||
|
|
||||||
files = [(util.path("test", "results", f"{category}.py"),
|
files = []
|
||||||
generate_test, False)]
|
|
||||||
if args.init_module:
|
if args.init_module:
|
||||||
files.append((util.path("gallery_dl", "extractor", f"{category}.py"),
|
files.append((util.path("gallery_dl", "extractor", f"{category}.py"),
|
||||||
generate_module, False))
|
generate_module, False))
|
||||||
files.append((util.path("gallery_dl", "extractor", "__init__.py"),
|
files.append((util.path("gallery_dl", "extractor", "__init__.py"),
|
||||||
insert_into_modules_list, True))
|
insert_into_modules_list, True))
|
||||||
|
if args.init_test:
|
||||||
|
files.append((util.path("test", "results", f"{category}.py"),
|
||||||
|
generate_test, False))
|
||||||
if args.site_name:
|
if args.site_name:
|
||||||
files.append((util.path("scripts", "supportedsites.py"),
|
files.append((util.path("scripts", "supportedsites.py"),
|
||||||
insert_into_supportedsites, True))
|
insert_into_supportedsites, True))
|
||||||
@@ -334,6 +336,9 @@ def parse_args(args=None):
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-M", "--no-module",
|
"-M", "--no-module",
|
||||||
dest="init_module", action="store_false")
|
dest="init_module", action="store_false")
|
||||||
|
parser.add_argument(
|
||||||
|
"-T", "--no-test",
|
||||||
|
dest="init_test", action="store_false")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-t", "--type",
|
"-t", "--type",
|
||||||
dest="type", metavar="TYPE")
|
dest="type", metavar="TYPE")
|
||||||
|
|||||||
Reference in New Issue
Block a user