3
0
Fork 0

Add Subcommand.make_arg_parser() method

split that out for clarity
This commit is contained in:
Lance Edgar 2023-11-21 20:48:44 -06:00
parent 4641e24afd
commit ed6a5db452
3 changed files with 30 additions and 5 deletions

View file

@ -169,9 +169,11 @@ class TestCommandArgumentParser(TestCase):
class TestSubcommand(TestCase):
def test_run(self):
def test_basic(self):
cmd = base.Command()
subcmd = base.Subcommand(cmd)
subcmd.name = 'foobar'
self.assertEqual(repr(subcmd), 'Subcommand(name=foobar)')
# TODO: this doesn't really test anything per se, but at least
# gives us the coverage..
subcmd._run()