We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d7a8384 commit 675dbf5Copy full SHA for 675dbf5
test/test_parser.py
@@ -344,6 +344,20 @@ def test_fill_in_default_prog():
344
]
345
346
347
+def test_fill_in_description_epilog():
348
+ """
349
+ Ensure that %(prog)s gets filled in inside description and epilog.
350
351
+ parser = argparse.ArgumentParser(
352
+ prog='test_fill_in_description',
353
+ description='Welcome to %(prog)s',
354
+ epilog='%(prog)s salutes you')
355
+ data = parse_parser(parser)
356
+
357
+ assert data['description'] == 'Welcome to test_fill_in_description'
358
+ assert data['epilog'] == 'test_fill_in_description salutes you'
359
360
361
def test_string_quoting():
362
"""
363
If an optional argument has a string type and a default, then the default should be in quotes.
0 commit comments