store config-file loading paths

This commit is contained in:
Matthias
2022-04-08 17:26:51 +02:00
parent 3427df0653
commit 1435d26996
6 changed files with 14 additions and 5 deletions

View File

@@ -222,6 +222,12 @@ def test_from_recursive_files(testdatadir) -> None:
# The other key comes from pricing2, which is imported by pricing.json
assert conf['exit_pricing']['price_side'] == "other"
assert len(conf['config_files']) == 4
assert 'testconfig.json' in conf['config_files'][0]
assert 'test_pricing_conf.json' in conf['config_files'][1]
assert 'test_base_config.json' in conf['config_files'][2]
assert 'test_pricing2_conf.json' in conf['config_files'][3]
files = testdatadir / "testconfigs/recursive.json"
with pytest.raises(OperationalException, match="Config loop detected."):
load_from_files([files])

View File

@@ -16,6 +16,6 @@
"price_last_balance": 0.0
},
"files": [
"pricing2.json"
"./test_pricing2_conf.json"
]
}

View File

@@ -1,6 +1,6 @@
{
"files": [
"base_config.json",
"pricing.json"
"test_base_config.json",
"test_pricing_conf.json"
]
}