MCPcopy Create free account
hub / github.com/ElementsProject/elements / run_test

Method run_test

test/functional/rpc_named_arguments.py:18–32  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

16 self.supports_cli = False
17
18 def run_test(self):
19 node = self.nodes[0]
20 h = node.help(command='getblockchaininfo')
21 assert h.startswith('getblockchaininfo\n')
22
23 assert_raises_rpc_error(-8, 'Unknown named parameter', node.help, random='getblockchaininfo')
24
25 h = node.getblockhash(height=0)
26 node.getblock(blockhash=h)
27
28 assert_equal(node.echo(), [])
29 assert_equal(node.echo(arg0=0,arg9=9), [0] + [None]*8 + [9])
30 assert_equal(node.echo(arg1=1), [None, 1])
31 assert_equal(node.echo(arg9=None), [None]*10)
32 assert_equal(node.echo(arg0=0,arg3=3,arg9=9), [0] + [None]*2 + [3] + [None]*5 + [9])
33
34if __name__ == '__main__':
35 NamedArgumentTest().main()

Callers

nothing calls this directly

Calls 4

assert_raises_rpc_errorFunction · 0.90
assert_equalFunction · 0.90
helpMethod · 0.80
echoMethod · 0.80

Tested by

no test coverage detected