Browse Source

pytest: Make the config section configurable

Since we will soon be writing the `liquid-regtest` section instead of the
`regtest` section we should make that configurable.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
travis-debug
Christian Decker 6 years ago
committed by Rusty Russell
parent
commit
3abd4801f0
  1. 4
      tests/utils.py

4
tests/utils.py

@ -66,12 +66,12 @@ def wait_for(success, timeout=TIMEOUT):
raise ValueError("Error waiting for {}", success)
def write_config(filename, opts, regtest_opts=None):
def write_config(filename, opts, regtest_opts=None, section_name='regtest'):
with open(filename, 'w') as f:
for k, v in opts.items():
f.write("{}={}\n".format(k, v))
if regtest_opts:
f.write("[regtest]\n")
f.write("[{}]\n".format(section_name))
for k, v in regtest_opts.items():
f.write("{}={}\n".format(k, v))

Loading…
Cancel
Save