def test_Config_copy_deep(): config = Config() config['a'] = 10 config['sub'] = {'x': 10, 'y': 20, 'z': {'w': 30, 't': 40}} s = config.to_string(fmt="zirkon") # config.dump() # print() config2 = config.copy() del config2["a"] del config2["sub"]["y"] del config2["sub"]["z"] # config.dump() s2 = config.to_string(fmt="zirkon") assert s == s2
def test_Config_set_zirkon_times(ztinstance): config = Config() config['x'] = ztinstance assert config['x'] == ztinstance print(config.to_string()) assert config.to_string() == Config.from_string(config.to_string()).to_string()