Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: Add usage note to check-rpc-mappings.py #13707

Merged

Conversation

Projects
None yet
4 participants
@masonicboom
Copy link
Contributor

commented Jul 19, 2018

This test would previously fail without a user-friendly warning message, if invoked with no arguments.

Test plan:

bitcoin @_@$ python3 test/lint/check-rpc-mappings.py
Usage: test/lint/check-rpc-mappings.py ROOT-DIR
bitcoin @_@$ echo $?
1
bitcoin @_@$ python3 test/lint/check-rpc-mappings.py .
* Checking consistency between dispatch tables and vRPCConvertParams
bitcoin @_@$ echo $?
0

@fanquake fanquake added the Tests label Jul 19, 2018

@masonicboom masonicboom changed the title Tests: add usage note to check-rpc-mappings.py tests: add usage note to check-rpc-mappings.py Jul 19, 2018

@masonicboom masonicboom changed the title tests: add usage note to check-rpc-mappings.py tests: Add usage note to check-rpc-mappings.py Jul 19, 2018

test/lint/check-rpc-mappings.py Outdated
@@ -90,6 +90,10 @@ def process_mapping(fname):
return cmds

def main():
if len(sys.argv) != 2:
print(('Usage: %s ROOT-DIR' % sys.argv[0]), file=sys.stderr)

This comment has been minimized.

Copy link
@practicalswift

practicalswift Jul 19, 2018

Member

Nit: Remove redundant parentheses around ' and use .format(…).

@masonicboom masonicboom force-pushed the masonicboom:add-usage-note-to-check-rpc-mappings branch to 03a2d68 Jul 19, 2018

MarcoFalke added a commit that referenced this pull request Jul 20, 2018

Merge #13718: docs: Specify preferred Python string formatting technique
b1b8863 docs: Specify preferred Python string formatting technique (Mason Simon)

Pull request description:

  @practicalswift this documents the nit you suggested in my previous PR
  #13707 (comment)

Tree-SHA512: b75335976b30ccbce5c2e3a46e5b6218e797944e7025c17b4e56f294670397d731e1a9f4fe7e809d907136e2e62cd9c2b8404b875b4879a1e3f0b1970b94d5a8
@laanwj

This comment has been minimized.

Copy link
Member

commented Aug 25, 2018

ACK 03a2d68

@laanwj laanwj merged commit 03a2d68 into bitcoin:master Aug 25, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

laanwj added a commit that referenced this pull request Aug 25, 2018

Merge #13707: tests: Add usage note to check-rpc-mappings.py
03a2d68 Tests: add usage note to check-rpc-mappings.py (Mason Simon)

Pull request description:

  This test would previously fail without a user-friendly warning message, if invoked with no arguments.

  Test plan:
  ```
  bitcoin @_@$ python3 test/lint/check-rpc-mappings.py
  Usage: test/lint/check-rpc-mappings.py ROOT-DIR
  bitcoin @_@$ echo $?
  1
  bitcoin @_@$ python3 test/lint/check-rpc-mappings.py .
  * Checking consistency between dispatch tables and vRPCConvertParams
  bitcoin @_@$ echo $?
  0
  ```

Tree-SHA512: 0b7a94125d18ba5dbf3c3281a4af60718d2e495bf7645d7c2a3e1a2a1d80cffcea1383c90247186728037f1f2b38de75d0f59ccf7f792d69edd33884f3698c07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.