diff options
author | John Newbery <john@johnnewbery.com> | 2018-02-07 10:38:25 -0500 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2018-03-18 13:32:50 -0400 |
commit | 58122736b53390a2013630e95ff760800af160e7 (patch) | |
tree | 386b714cff790ba9fae18135bb91c13455802e09 /test/functional/feature_config_args.py | |
parent | 0ec08a672dce3f619e46d0c7455e95a13dc5c4e2 (diff) |
[Tests] Require exact match in assert_start_raises_init_eror()
Diffstat (limited to 'test/functional/feature_config_args.py')
-rwxr-xr-x | test/functional/feature_config_args.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/functional/feature_config_args.py b/test/functional/feature_config_args.py index eb62ffc6a9..0c36547054 100755 --- a/test/functional/feature_config_args.py +++ b/test/functional/feature_config_args.py @@ -5,6 +5,7 @@ """Test various command line arguments and configuration file parameters.""" import os +import re from test_framework.test_framework import BitcoinTestFramework from test_framework.util import get_datadir_path @@ -25,13 +26,13 @@ class ConfArgsTest(BitcoinTestFramework): # Check that using -datadir argument on non-existent directory fails self.nodes[0].datadir = new_data_dir - self.nodes[0].assert_start_raises_init_error(['-datadir='+new_data_dir], 'Error: Specified data directory "' + new_data_dir + '" does not exist.') + self.nodes[0].assert_start_raises_init_error(['-datadir=' + new_data_dir], 'Error: Specified data directory "' + re.escape(new_data_dir) + '" does not exist.') # Check that using non-existent datadir in conf file fails conf_file = os.path.join(default_data_dir, "bitcoin.conf") with open(conf_file, 'a', encoding='utf8') as f: f.write("datadir=" + new_data_dir + "\n") - self.nodes[0].assert_start_raises_init_error(['-conf='+conf_file], 'Error reading configuration file: specified data directory "' + new_data_dir + '" does not exist.') + self.nodes[0].assert_start_raises_init_error(['-conf=' + conf_file], 'Error reading configuration file: specified data directory "' + re.escape(new_data_dir) + '" does not exist.') # Create the directory and ensure the config file now works os.mkdir(new_data_dir) |