def test_del_observation(imperfect_composite: Composite): expected: Dict = { "2010": { "weight_in_pounds": None }, "2011": {}, "2012": {} } imperfect_composite.del_observation("the_weight_var", "2011") assert imperfect_composite.content == expected
def delete_temporal(self, var: Variable, composite: Composite) -> None: for period in composite.periods: if var.descends_from_list: self.delete_multiple(var, composite.content[period]) else: composite.del_observation(var.var_id, period)
def test_del_observation_missing(imperfect_composite: Composite): expected: Dict = copy.deepcopy(imperfect_composite.content) imperfect_composite.del_observation("the_weight_var", "2012") assert imperfect_composite.content == expected