diff options
author | MarcoFalke <falke.marco@gmail.com> | 2018-11-28 15:57:47 -0500 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2018-11-28 15:58:18 -0500 |
commit | 9f556622c57d3f7a0fdc8e3807fd798ee4b5a2fe (patch) | |
tree | 6d1bce64f12a47f4a301c7e63b0904a31814eadf /test/functional/rpc_help.py | |
parent | 5150accdd2a7c7f0edf964d56bd7d34b5f740cdc (diff) | |
parent | 542651cfb408d10e6eaaa24ad985c95e51f88f75 (diff) | |
download | bitcoin-9f556622c57d3f7a0fdc8e3807fd798ee4b5a2fe.tar.xz |
Merge #14328: [0.17] Backports
542651cfb4 travis: Remove deprecated sudo (MarcoFalke)
ec71f06a8d build: Add bitcoin-tx.exe into Windows installer (Chun Kuan Lee)
7edebedef1 build: Remove illegal spacing in darwin.mk (Jon Layton)
fb9ad043f8 Fix listreceivedbyaddress not taking address as a string (Eric Scrivner)
91fa15aaeb wallet: Avoid potential use of unitialized value bnb_used in CWallet::CreateTransaction(...) (practicalswift)
96f15e8bb3 Tests: Fix a comment (fridokus)
60f7a97930 qa: Add test to ensure node can generate all help texts at runtime (MarcoFalke)
2f9fd29321 disallow oversized CBlockHeaderAndShortTxIDs (Kaz Wesley)
5331ad0506 fix a deserialization overflow edge case (Kaz Wesley)
94065024c7 add a test demonstrating an overflow in a deserialization edge case (Kaz Wesley)
85aacc41ba Add autogen.sh in ARM Cross-compilation (Walter)
bb90695551 [wallet] Ensure wallet is unlocked before signing (gustavonalle)
Pull request description:
Tree-SHA512: d82813134e5fc5437fe690127a4701d7ba66bf27799d7ecb1fbc2cc4dd81b6b3f708c1f314b725e8a3a6525ffa388299e277157f784f762256e01afb24822b25
Diffstat (limited to 'test/functional/rpc_help.py')
-rwxr-xr-x | test/functional/rpc_help.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/functional/rpc_help.py b/test/functional/rpc_help.py index be096af892..78d6e78aed 100755 --- a/test/functional/rpc_help.py +++ b/test/functional/rpc_help.py @@ -7,12 +7,18 @@ from test_framework.test_framework import BitcoinTestFramework from test_framework.util import assert_equal, assert_raises_rpc_error +import os + class HelpRpcTest(BitcoinTestFramework): def set_test_params(self): self.num_nodes = 1 def run_test(self): + self.test_categories() + self.dump_help() + + def test_categories(self): node = self.nodes[0] # wrong argument count @@ -37,6 +43,15 @@ class HelpRpcTest(BitcoinTestFramework): assert_equal(titles, components) + def dump_help(self): + dump_dir = os.path.join(self.options.tmpdir, 'rpc_help_dump') + os.mkdir(dump_dir) + calls = [line.split(' ', 1)[0] for line in self.nodes[0].help().splitlines() if line and not line.startswith('==')] + for call in calls: + with open(os.path.join(dump_dir, call), 'w', encoding='utf-8') as f: + # Make sure the node can generate the help at runtime without crashing + f.write(self.nodes[0].help(call)) + if __name__ == '__main__': HelpRpcTest().main() |