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
qa: Make TestNodeCLI command optional in send_cli #12089
Conversation
faf5a49
to
fad4214
Compare
fad4214
to
fab04c3
Compare
Tested ACK fab04c3f55715f8d63ae88d087e9ea83f525a670 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK fab04c3f55715f8d63ae88d087e9ea83f525a670, but could be cleaned up slightly.
if named_args: | ||
p_args += ["-named"] | ||
p_args += [command] + pos_args + named_args | ||
if command: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest s/command/command is not None/
so if 0
or False
or []
or ""
is passed, it will trigger appropriate python type errors or "method not found" error instead of "too few parameters" error.
@@ -213,16 +213,16 @@ class TestNodeCLI(): | |||
"""Interface to bitcoin-cli for an individual node""" | |||
|
|||
def __init__(self, binary, datadir): | |||
self.args = [] | |||
self.options = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename seems appropriate, but ideally it would be in a separate commit, since it is bigger than the real change, and doesn't even overlap with it.
That is the name in bitcoin-cli -help
fab04c3
to
faf1ab0
Compare
faf1ab0
to
fae7b14
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK fae7b14. Thanks for update! Only changes since last review were what was suggested.
Tested ACK fae7b14 |
fae7b14 qa: Make TestNodeCLI command optional in send_cli (MarcoFalke) ffffb10 qa: Rename cli.args to cli.options (MarcoFalke) Pull request description: Makes the `command` optional, since there are valid bitcoin-cli calls that have no `command`: * `bitcoin-cli -?` * `bitcoin-cli -getinfo` * ... Also, rename self.args to self.options, since that is the name in the `bitcoin-cli -help` documentation. Tree-SHA512: f49c06024e78423301d70782946d47c0fb97a26876afba0a1f71ed329f5d7124aee4c2df520c7af74079bf9937851902f7be9c54abecc28dc29274584804d46c
fae7b14 qa: Make TestNodeCLI command optional in send_cli (MarcoFalke) ffffb10 qa: Rename cli.args to cli.options (MarcoFalke) Pull request description: Makes the `command` optional, since there are valid bitcoin-cli calls that have no `command`: * `bitcoin-cli -?` * `bitcoin-cli -getinfo` * ... Also, rename self.args to self.options, since that is the name in the `bitcoin-cli -help` documentation. Tree-SHA512: f49c06024e78423301d70782946d47c0fb97a26876afba0a1f71ed329f5d7124aee4c2df520c7af74079bf9937851902f7be9c54abecc28dc29274584804d46c
fae7b14 qa: Make TestNodeCLI command optional in send_cli (MarcoFalke) ffffb10 qa: Rename cli.args to cli.options (MarcoFalke) Pull request description: Makes the `command` optional, since there are valid bitcoin-cli calls that have no `command`: * `bitcoin-cli -?` * `bitcoin-cli -getinfo` * ... Also, rename self.args to self.options, since that is the name in the `bitcoin-cli -help` documentation. Tree-SHA512: f49c06024e78423301d70782946d47c0fb97a26876afba0a1f71ed329f5d7124aee4c2df520c7af74079bf9937851902f7be9c54abecc28dc29274584804d46c
Makes the
command
optional, since there are valid bitcoin-cli calls that have nocommand
:bitcoin-cli -?
bitcoin-cli -getinfo
Also, rename self.args to self.options, since that is the name in the
bitcoin-cli -help
documentation.