(self)
| 2855 | ''')) |
| 2856 | |
| 2857 | def test_help_blank(self): |
| 2858 | # Issue 24444 |
| 2859 | parser = ErrorRaisingArgumentParser( |
| 2860 | prog='PROG', description='main description') |
| 2861 | parser.add_argument( |
| 2862 | 'foo', |
| 2863 | help=' ') |
| 2864 | self.assertEqual(parser.format_help(), textwrap.dedent('''\ |
| 2865 | usage: PROG [-h] foo |
| 2866 | |
| 2867 | main description |
| 2868 | |
| 2869 | positional arguments: |
| 2870 | foo \n |
| 2871 | options: |
| 2872 | -h, --help show this help message and exit |
| 2873 | ''')) |
| 2874 | |
| 2875 | parser = ErrorRaisingArgumentParser( |
| 2876 | prog='PROG', description='main description') |
| 2877 | parser.add_argument( |
| 2878 | 'foo', choices=[], |
| 2879 | help='%(choices)s') |
| 2880 | self.assertEqual(parser.format_help(), textwrap.dedent('''\ |
| 2881 | usage: PROG [-h] {} |
| 2882 | |
| 2883 | main description |
| 2884 | |
| 2885 | positional arguments: |
| 2886 | {} \n |
| 2887 | options: |
| 2888 | -h, --help show this help message and exit |
| 2889 | ''')) |
| 2890 | |
| 2891 | def test_help_alternate_prefix_chars(self): |
| 2892 | parser = self._get_parser(prefix_chars='+:/') |
nothing calls this directly
no test coverage detected