def test_recursive_update_overwrites_scalar_with_dict(self): e = {"a": {"b": 5}} f = {"a": {"b": {"c": 1}}} recursive_update(e, f) assert e["a"]["b"] == {"c": 1}
def test_recursive_update_combines_dicts(self): e = {"a": {"b": {"c": 1}}} f = {"a": {"b": {"d": 2}}} recursive_update(e, f) assert e["a"]["b"]["c"] == 1 assert e["a"]["b"]["d"] == 2
def test_recursive_update_overwrites_scalars(self): e = {"a": {"b": {"c": 1}}} f = {"a": {"b": {"c": 2}}} recursive_update(e, f) assert e["a"]["b"]["c"] == 2
def test_recursive_update_overwrites_string_with_string(self): e = {"a": {"b": {"c": "hello"}}} f = {"a": {"b": {"c": "world"}}} recursive_update(e, f) assert e["a"]["b"]["c"] == "world"