(self)
| 2801 | 'usage: PROG --foo FOO sub [-h] arg\n') |
| 2802 | |
| 2803 | def test_help(self): |
| 2804 | self.assertEqual(self.parser.format_usage(), |
| 2805 | 'usage: PROG [-h] [--foo] bar {1,2,3} ...\n') |
| 2806 | self.assertEqual(self.parser.format_help(), textwrap.dedent('''\ |
| 2807 | usage: PROG [-h] [--foo] bar {1,2,3} ... |
| 2808 | |
| 2809 | main description |
| 2810 | |
| 2811 | positional arguments: |
| 2812 | bar bar help |
| 2813 | {1,2,3} command help |
| 2814 | |
| 2815 | options: |
| 2816 | -h, --help show this help message and exit |
| 2817 | --foo foo help |
| 2818 | ''')) |
| 2819 | |
| 2820 | def test_help_extra_prefix_chars(self): |
| 2821 | # Make sure - is still used for help if it is a non-first prefix char |
nothing calls this directly
no test coverage detected