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 -getinfoAlso, rename self.args to self.options, since that is the name in the bitcoin-cli -help documentation.
Tested ACK fab04c3f55715f8d63ae88d087e9ea83f525a670
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:
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.
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 = []
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.
utACK fab04c3f55715f8d63ae88d087e9ea83f525a670, but could be cleaned up slightly.
That is the name in bitcoin-cli -help
utACK fae7b14a0468fba43ca8ce87249be69e13cea608. Thanks for update! Only changes since last review were what was suggested.
Tested ACK fae7b14a0468fba43ca8ce87249be69e13cea608