def add_cleanup_subcommand(subparser_factory):

    cleanup_help = "Drop all temporary test databases."
    description = (cleanup_help + " Note that running " +
                   "this command may cause tests currently running to fail.")
    subparser = subparser_factory.add_parser('cleanup', help=cleanup_help,
                                             description=description)

    subparser.set_defaults(subcommand=run_cleanup_subcommand)
Add a subparser for the cleanup subcommand.
dataset/ETHPy150Open GeoscienceAustralia/agdc/src/testdb.py/add_cleanup_subcommand