mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
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>
This commit is contained in:
parent
25c830a533
commit
3abd4801f0
@ -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…
Reference in New Issue
Block a user