Closed
Description
maybe here we should deep copy the original value then modify it ?
or is this (not support reset override) expected behavior?
def test_configuration_set():
from dependency_injector import providers
config = providers.Configuration(
name="config", default={"a": {"b": {"c": 1, "d": 2}}}
)
assert config.a.b.c() == 1
with config.set("a.b.c", "xxx"):
assert config.a.b.c() == "xxx"
assert config.a.b.c() == 1 # will fail here, AssertionError: assert 'xxx' == 1
with config.a.b.c.override("yyy"):
assert config.a.b.c() == "yyy"
assert config.a.b.c() == 1 # will fail here, AssertionError: assert 'yyy' == 1