Skip to content

Commit 6af27b8

Browse files
author
MarcoFalke
committed
Merge bitcoin#14619: tests: Fix value display name in test_runner help text
5a05aa2 Add metavar to match var name in help text + Change wording for better readability (Martin Erlandsson) Pull request description: The help text given by `test/functional/test_runner.py -h` refers to the value `n`, which is defined as `COMBINEDLOGSLEN` in the list of commands. To make the help text consistent, this PR changes the display name `COMBINEDLOGSLEN` to `n` by setting the argparse [`metavar`](https://docs.python.org/3/library/argparse.html#metavar) attribute. (`metavar` only changes the _displayed_ name) Alternatively: Do the opposite and change the help text to use `COMBINEDLOGSLEN`. --- Before PR: ``` ➜ bitcoin > test/functional/test_runner.py -h | grep -A 1 combinedlogslen --combinedlogslen COMBINEDLOGSLEN, -c COMBINEDLOGSLEN print a combined log (of length n lines) from all test nodes and test framework to the console on failure. ``` After PR: ``` ➜ bitcoin > test/functional/test_runner.py -h | grep -A 1 combinedlogslen --combinedlogslen n, -c n print a combined log (of length n lines) from all test nodes and test frameworks to the console on failure. ``` --- Also, fixed pluralization typo. Tree-SHA512: a1124a4976d29fae1e8ecd7fa2ac523b7f05d541c611166532f44692995691a96faf797fa71582d78634f328b500cbee49c6ef296c8f1a898a57c050cc4e721d
2 parents 880bc72 + 5a05aa2 commit 6af27b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/functional/test_runner.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def main():
212212
epilog='''
213213
Help text and arguments for individual test script:''',
214214
formatter_class=argparse.RawTextHelpFormatter)
215-
parser.add_argument('--combinedlogslen', '-c', type=int, default=0, help='print a combined log (of length n lines) from all test nodes and test framework to the console on failure.')
215+
parser.add_argument('--combinedlogslen', '-c', type=int, default=0, metavar='n', help='On failure, print a log (of length n lines) to the console, combined from the test framework and all test nodes.')
216216
parser.add_argument('--coverage', action='store_true', help='generate a basic coverage report for the RPC interface')
217217
parser.add_argument('--ci', action='store_true', help='Run checks and code that are usually only enabled in a continuous integration environment')
218218
parser.add_argument('--exclude', '-x', help='specify a comma-separated-list of scripts to exclude.')

0 commit comments

Comments
 (0)