

def test_subcommand_may_have_positional(self):
    child = commands.Command()
    child.add_argument('bar')
    cmd = commands.Command()
    cmd.add_child('foo', child)
    result = cmd.parse(['foo', 'baz'])
    self.assertEqual(result.bar, 'baz')

dataset/ETHPy150Open mopidy/mopidy/tests/test_commands.py CommandParsingTest.test_subcommand_may_have_positional/original