test/functional/test_framework/test_node.py
def send_cli(self, command, *args, **kwargs):
        """Run wificoin-cli command. Deserializes returned string as python object."""

        pos_args = [str(arg) for arg in args]
        named_args = [str(key) + "=" + str(value) for (key, value) in kwargs.items()]
        assert not (pos_args and named_args), "Cannot use positional arguments and named arguments in the same wificoin-cli call"
        p_args = [self.binary, "-datadir=" + self.datadir] + self.args
        if named_args:
            p_args += ["-named"]
        p_args += [command] + pos_args + named_args
        process = subprocess.Popen(p_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)
        cli_stdout, cli_stderr = process.communicate(input=self.input)
        returncode = process.poll()
        if returncode:
            # Ignore cli_stdout, raise with cli_stderr
            raise subprocess.CalledProcessError(returncode, self.binary, output=cli_stderr)
        return json.loads(cli_stdout, parse_float=decimal.Decimal)
Run wificoin-cli command. Deserializes returned string as python object.
Run wificoin-cli command. Deserializes returned string as python object.
Run wificoin - cli command . Deserializes returned string as python object .
def send_cli(self, command, *args, **kwargs):
        pos_args = [str(arg) for arg in args]
        named_args = [str(key) + "=" + str(value) for (key, value) in kwargs.items()]
        assert not (pos_args and named_args), "Cannot use positional arguments and named arguments in the same wificoin-cli call"
        p_args = [self.binary, "-datadir=" + self.datadir] + self.args
        if named_args:
            p_args += ["-named"]
        p_args += [command] + pos_args + named_args
        process = subprocess.Popen(p_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)
        cli_stdout, cli_stderr = process.communicate(input=self.input)
        returncode = process.poll()
        if returncode:
            raise subprocess.CalledProcessError(returncode, self.binary, output=cli_stderr)
        return json.loads(cli_stdout, parse_float=decimal.Decimal)
def send_cli ( self , command , * args , ** kwargs ) : pos_args = [ str ( arg ) for arg in args ] named_args = [ str ( key ) + "=" + str ( value ) for ( key , value ) in kwargs . items ( ) ] assert not ( pos_args and named_args ) , "Cannot use positional arguments and named arguments in the same wificoin-cli call" p_args = [ self . binary , "-datadir=" + self . datadir ] + self . args if named_args : p_args += [ "-named" ] p_args += [ command ] + pos_args + named_args process = subprocess . Popen ( p_args , stdin = subprocess . PIPE , stdout = subprocess . PIPE , stderr = subprocess . PIPE , universal_newlines = True ) cli_stdout , cli_stderr = process . communicate ( input = self . input ) returncode = process . poll ( ) if returncode : raise subprocess . CalledProcessError ( returncode , self . binary , output = cli_stderr ) return json . loads ( cli_stdout , parse_float = decimal . Decimal )
Run wificoin-cli command.
Run wificoin - cli command .
"""Run wificoin-cli command. Deserializes returned string as python object.""" # Ignore cli_stdout, raise with cli_stderr
self
command