def test_ifs_size_errors(self): criteria, v1 = self.responses['sumifs'][0][1:] v2 = (v1[0][:-1], ) assert countifs(v1, criteria, v2, criteria) == VALUE_ERROR assert sumifs(v1, v1, criteria, v2, criteria) == VALUE_ERROR assert maxifs(v1, v1, criteria, v2, criteria) == VALUE_ERROR assert minifs(v1, v1, criteria, v2, criteria) == VALUE_ERROR assert averageifs(v1, v1, criteria, v2, criteria) == VALUE_ERROR
def test_averageifs(result, criteria, values): assert averageifs(values, values, criteria) == result
def test_averageifs(data, result): if isinstance(result, type(Exception)): with pytest.raises(result): averageifs(*data) else: assert averageifs(*data) == result