

def test_missing_positionals_subcommand(self):
    child = commands.Command()
    child.add_argument('baz')
    cmd = commands.Command()
    cmd.add_child('bar', child)
    with cmd.assertRaises(SystemExit):
        cmd.parse(['bar'], prog='foo')
    self.exit_mock.assert_called_once_with(1, 'too few arguments', 'usage: foo bar baz')

dataset/ETHPy150Open mopidy/mopidy/tests/test_commands.py CommandParsingTest.test_missing_positionals_subcommand/VarMisuse@43/55 `self`->`cmd`