def test_remove_var(): dk = dict(k=1, limit_k=1, error_k=1, fix_k=1) dm = dict(m=1, limit_m=1, error_m=1, fix_m=1) dn = dict(n=1, limit_n=1, error_n=1, fix_n=1) d = {} d.update(dk) d.update(dm) d.update(dn) with pytest.warns(DeprecationWarning): d = util.remove_var(d, ["k", "m"]) assert set(d.keys()) & set(dk.keys()) == set() assert set(d.keys()) & set(dm.keys()) == set()
def test_remove_var(): dk = dict(k=1,limit_k=1,error_k=1,fix_k=1) dl = dict(l=1,limit_l=1,error_l=1,fix_l=1) dm = dict(m=1,limit_m=1,error_m=1,fix_m=1) dn = dict(n=1,limit_n=1,error_n=1,fix_n=1) d = {} d.update(dk) d.update(dl) d.update(dm) d.update(dn) ret = remove_var(d,['k','m']) for k in dk: assert_false(k in ret) for k in dl: assert_true(k in ret) for k in dm: assert_false(k in ret) for k in dn: assert_true(k in ret)
def test_remove_var(): dk = dict(k=1, limit_k=1, error_k=1, fix_k=1) dl = dict(l=1, limit_l=1, error_l=1, fix_l=1) dm = dict(m=1, limit_m=1, error_m=1, fix_m=1) dn = dict(n=1, limit_n=1, error_n=1, fix_n=1) d = {} d.update(dk) d.update(dl) d.update(dm) d.update(dn) ret = remove_var(d, ["k", "m"]) for k in dk: assert k not in ret for k in dl: assert k in ret for k in dm: assert k not in ret for k in dn: assert k in ret