

def test_command_with_option_and_positional(self):
    cmd = commands.Command()
    cmd.add_argument('-h', '--help', action='store_true', help='show this message')
    cmd.add_argument('bar', help='some help text')
    expected = 'usage: foo [-h] bar\n\nOPTIONS:\n\n  -h, --help  show this message\n  bar         some help text'
    self.assertEqual(expected, cmd.format_help('foo').strip())

dataset/ETHPy150Open mopidy/mopidy/tests/test_commands.py HelpTest.test_command_with_option_and_positional/original