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.
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.
248- p_args = [self.binary, "-datadir=" + self.datadir] + self.args
249+ p_args = [self.binary, "-datadir=" + self.datadir] + self.options
250 if named_args:
251 p_args += ["-named"]
252- p_args += [command] + pos_args + named_args
253+ if command:
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.
212@@ -213,16 +213,16 @@ class TestNodeCLI():
213 """Interface to bitcoin-cli for an individual node"""
214
215 def __init__(self, binary, datadir):
216- self.args = []
217+ self.options = []
That is the name in bitcoin-cli -help
Labels
Tests