diff options
author | MarcoFalke <falke.marco@gmail.com> | 2019-04-26 07:49:21 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2019-04-26 07:49:43 -0400 |
commit | f73a3c618b87787badeb0a091627c398bb78b213 (patch) | |
tree | 1ec38dbb698567d31ae31326d3bf913b53efcc46 | |
parent | 653b2b4426cf762f90707c27c3f435142c911ab6 (diff) | |
parent | a014373d81534c9df4a2cbac0f74181e708da3cc (diff) |
Merge #15895: QA: Avoid re-reading config.ini unnecessarily
a014373d81 QA: Avoid re-reading config.ini unnecessarily (Luke Dashjr)
Pull request description:
BitcoinTestFramework.main already loads and stores config.ini on the object itself; just access that instead of re-reading the file to check for features
ACKs for commit a01437:
practicalswift:
utACK a014373d81534c9df4a2cbac0f74181e708da3cc
hebasto:
utACK a014373d81534c9df4a2cbac0f74181e708da3cc
Tree-SHA512: 36e3dda36cf4fae243feb1655da2891d1b78c86319be9bd9809c20054fa0cb75749370b05aa9d589a4dcab6322d8cdf4e874c5175144ed23ba63b2ed338538ca
-rwxr-xr-x | test/functional/test_framework/test_framework.py | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index 4aeff24d12..555d55d97f 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -556,21 +556,12 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass): def is_cli_compiled(self): """Checks whether bitcoin-cli was compiled.""" - config = configparser.ConfigParser() - config.read_file(open(self.options.configfile)) - - return config["components"].getboolean("ENABLE_CLI") + return self.config["components"].getboolean("ENABLE_CLI") def is_wallet_compiled(self): """Checks whether the wallet module was compiled.""" - config = configparser.ConfigParser() - config.read_file(open(self.options.configfile)) - - return config["components"].getboolean("ENABLE_WALLET") + return self.config["components"].getboolean("ENABLE_WALLET") def is_zmq_compiled(self): """Checks whether the zmq module was compiled.""" - config = configparser.ConfigParser() - config.read_file(open(self.options.configfile)) - - return config["components"].getboolean("ENABLE_ZMQ") + return self.config["components"].getboolean("ENABLE_ZMQ") |