xfstestsdb/xfstestsdb/testcase/__init__.py

25 lines
887 B
Python

# Copyright 2023 (c) Anna Schumaker.
"""The `xfstestsdb testcase` command."""
import argparse
from .. import commands
from .. import sqlite
from . import list
from . import show
class Command(commands.Command):
"""The `xfstestsdb testcase` command."""
def __init__(self, subparser: argparse.Action,
sql: sqlite.Connection) -> None:
"""Set up the testcase command."""
super().__init__(subparser, sql, "testcase",
help="xfstestsdb testcase commands")
self.subparser = self.parser.add_subparsers(title="testcase commands")
self.commands = {"list": list.Command(self.subparser, sql),
"show": show.Command(self.subparser, sql)}
def do_command(self, args: argparse.Namespace) -> None:
"""Print help text for the testcase subcommand."""
self.parser.print_usage()