tests: Fix value display name in test_runner help text #14619

pull merland wants to merge 1 commits into bitcoin:master from merland:test-runner-fix changing 1 files +1 −1
  1. merland commented at 2:46 PM on October 31, 2018: contributor

    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 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.

  2. practicalswift commented at 3:02 PM on October 31, 2018: contributor

    Concept ACK

  3. fanquake added the label Tests on Oct 31, 2018
  4. DrahtBot commented at 4:55 PM on November 1, 2018: member

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    No conflicts as of last run.

  5. Add metavar to match var name in help text + Change wording for better readability 5a05aa2db2
  6. in test/functional/test_runner.py:217 in 79450eb763 outdated
     213 | @@ -214,7 +214,7 @@ def main():
     214 |                                       epilog='''
     215 |      Help text and arguments for individual test script:''',
     216 |                                       formatter_class=argparse.RawTextHelpFormatter)
     217 | -    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.')
     218 | +    parser.add_argument('--combinedlogslen', '-c', type=int, default=0, metavar='n', help='print a combined log (of length n lines) from all test nodes and test frameworks to the console on failure.')
    


    MarcoFalke commented at 9:49 PM on November 5, 2018:
        parser.add_argument('--combinedlogslen', '-c', type=int, default=0, metavar='n', help='print a combined log (of length n lines) from all test nodes and test framework to the console on failure.')
    

    There is only one test framework


    merland commented at 6:21 AM on November 6, 2018:

    Thanks. I think I misread due to the fact that there is no "the". For better readability, I suggest to apply your change and then switch the order: from the test framework all test nodes I'll update the commit.


    merland commented at 7:12 AM on November 6, 2018:

    Realized the whole sentence was a bit complicated, so I rephrased slightly. Hopefully more readable now. @MarcoFalke

  7. merland force-pushed on Nov 6, 2018
  8. MarcoFalke referenced this in commit 6af27b8157 on Nov 6, 2018
  9. MarcoFalke merged this on Nov 6, 2018
  10. MarcoFalke closed this on Nov 6, 2018

  11. merland deleted the branch on Nov 22, 2018
  12. jasonbcox referenced this in commit 628feab68a on Nov 10, 2020
  13. PastaPastaPasta referenced this in commit b613709700 on Jun 27, 2021
  14. PastaPastaPasta referenced this in commit 2ab058194d on Jun 28, 2021
  15. PastaPastaPasta referenced this in commit 200d34da6a on Jun 29, 2021
  16. PastaPastaPasta referenced this in commit 169412807a on Jul 1, 2021
  17. PastaPastaPasta referenced this in commit 8599755124 on Jul 1, 2021
  18. PastaPastaPasta referenced this in commit 13249b55d8 on Jul 1, 2021
  19. PastaPastaPasta referenced this in commit d227d814a3 on Jul 3, 2021
  20. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-15 15:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me