Changeset View
Changeset View
Standalone View
Standalone View
test/functional/feature_config_args.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# Copyright (c) 2017-2019 The Bitcoin Core developers | # Copyright (c) 2017-2019 The Bitcoin Core developers | ||||
# Distributed under the MIT software license, see the accompanying | # Distributed under the MIT software license, see the accompanying | ||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | # file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
"""Test various command line arguments and configuration file parameters.""" | """Test various command line arguments and configuration file parameters.""" | ||||
import os | import os | ||||
from test_framework.test_framework import BitcoinTestFramework | from test_framework.test_framework import BitcoinTestFramework | ||||
class ConfArgsTest(BitcoinTestFramework): | class ConfArgsTest(BitcoinTestFramework): | ||||
def set_test_params(self): | def set_test_params(self): | ||||
self.setup_clean_chain = True | self.setup_clean_chain = True | ||||
self.num_nodes = 1 | self.num_nodes = 1 | ||||
def skip_test_if_missing_module(self): | |||||
self.skip_if_no_wallet() | |||||
def test_config_file_parser(self): | def test_config_file_parser(self): | ||||
# Assume node is stopped | # Assume node is stopped | ||||
inc_conf_file_path = os.path.join( | inc_conf_file_path = os.path.join( | ||||
self.nodes[0].datadir, 'include.conf') | self.nodes[0].datadir, 'include.conf') | ||||
with open(os.path.join(self.nodes[0].datadir, 'bitcoin.conf'), 'a', encoding='utf-8') as conf: | with open(os.path.join(self.nodes[0].datadir, 'bitcoin.conf'), 'a', encoding='utf-8') as conf: | ||||
conf.write('includeconf={}\n'.format(inc_conf_file_path)) | conf.write('includeconf={}\n'.format(inc_conf_file_path)) | ||||
▲ Show 20 Lines • Show All 65 Lines • Show Last 20 Lines |