def test_cleanup_subclass(): a = TypeMap({int: Merge("int")}) ca = cleanup(a) assert isinstance(ca, TypeMap) assert ca == TypeMap({int: "int"})
def test_cleanup(): a = dict(a=1, b=[2, Merge(3)], c=Override(4), d=DELETE) assert cleanup(a) == dict(a=1, b=[2, 3], c=4)