diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-08-12 00:26:37 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-08-12 11:44:12 +0200 |
commit | 0df7a6c13ec484f9f31cfe3ed3039098a9bef124 (patch) | |
tree | 4e1961b56c06e9398093a0a1a092929861c2f3f7 /test/functional/rpc_getblockstats.py | |
parent | 1b04b55f2d22078ca79cd38fc1078e15fa9cbe94 (diff) | |
parent | 5654efb187d24eb29a343c720e3937b01457c8b7 (diff) | |
download | bitcoin-0df7a6c13ec484f9f31cfe3ed3039098a9bef124.tar.xz |
Merge #13944: test: Port usage of deprecated optparse module to argparse module
5654efb187d24eb29a343c720e3937b01457c8b7 Ported usage of deprecated optparse module to argparse module (Kvaciral)
Pull request description:
The optparse module is deprecated since Python 2,7/3.2 . Recommend usage of the argparse module which improves upon optparse.
Tree-SHA512: ffd0e3e6f3babef1675226b107eeb7a6bab6e5199de572703da9d94e1f69c70d1c9abc353e9664b40670bb4976c06964bb2606deee52f5dfcc619f336ceb8cf8
Diffstat (limited to 'test/functional/rpc_getblockstats.py')
-rwxr-xr-x | test/functional/rpc_getblockstats.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/functional/rpc_getblockstats.py b/test/functional/rpc_getblockstats.py index 37ef9f2b68..af9a544fd7 100755 --- a/test/functional/rpc_getblockstats.py +++ b/test/functional/rpc_getblockstats.py @@ -35,13 +35,13 @@ class GetblockstatsTest(BitcoinTestFramework): ] def add_options(self, parser): - parser.add_option('--gen-test-data', dest='gen_test_data', - default=False, action='store_true', - help='Generate test data') - parser.add_option('--test-data', dest='test_data', - default='data/rpc_getblockstats.json', - action='store', metavar='FILE', - help='Test data file') + parser.add_argument('--gen-test-data', dest='gen_test_data', + default=False, action='store_true', + help='Generate test data') + parser.add_argument('--test-data', dest='test_data', + default='data/rpc_getblockstats.json', + action='store', metavar='FILE', + help='Test data file') def set_test_params(self): self.num_nodes = 2 |