From 3abd4801f0e8eca97697fa761de909ff2e428ff8 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Wed, 10 Apr 2019 23:34:16 +0200 Subject: [PATCH] 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 --- tests/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/utils.py b/tests/utils.py index efa659395..adaf03a19 100644 --- a/tests/utils.py +++ b/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))