pytest: allow duplicated options.

Python dict can't have duplicate entries, but some options can be specified
multiple times.  The easiest way is to put a list in the dict.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2018-06-23 13:59:21 +09:30 committed by Christian Decker
parent 284f0a04c9
commit e6f31b3c66
1 changed files with 3 additions and 0 deletions

View File

@ -316,6 +316,9 @@ class LightningD(TailableProc):
for k, v in sorted(self.opts.items()):
if v is None:
opts.append("--{}".format(k))
elif isinstance(v, list):
for i in v:
opts.append("--{}={}".format(k, i))
else:
opts.append("--{}={}".format(k, v))