

def test_subcommand_with_options_shown(self):
    child = commands.Command()
    child.add_argument('-h', '--help', action='store_true', help='show this message')
    cmd = commands.Command()
    cmd.add_child('bar', child)
    expected = 'usage: foo\n\nCOMMANDS:\n\nbar [-h]\n\n    -h, --help  show this message'
    self.assertEqual(expected, cmd.format_help('foo').strip())

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