

def test_register_custom(self):
    collector = begin.subcommands.Collector()

    @begin.subcommand(collector=collector)
    def one():
        pass

    @begin.subcommand(collector=collector)
    def two():
        pass
    self.assertEqual(list(collector.commands()), [one, two])

dataset/ETHPy150Open aliles/begins/tests/test_subcommands.py TestSubCommand.test_register_custom/original