pytest: make utils.py read config.vars.

I could not figure out why test_announce_address suddenly stopped working:
I had previously been using DEVELOPER=1 on the cmdline for historical
reasons when testing locally.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-07-16 15:22:56 +09:30
committed by Christian Decker
parent a37e692af6
commit edf043c89b

View File

@@ -27,7 +27,10 @@ LIGHTNINGD_CONFIG = {
'disable-dns': None,
}
DEVELOPER = os.getenv("DEVELOPER", "0") == "1"
with open('config.vars') as configfile:
config = dict([(line.rstrip().split('=', 1)) for line in configfile])
DEVELOPER = os.getenv("DEVELOPER", config['DEVELOPER']) == "1"
TIMEOUT = int(os.getenv("TIMEOUT", "60"))