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_countifs_odd_args_len(self): with pytest.raises(PyCelException): countifs([7, 25, 13, 25], 25, [100, 102, 201, 20])
def test_countifs_regular(self): assert 1 == countifs([7, 25, 13, 25], 25, [100, 102, 201, 20], ">100")
def test_countifs(result, criteria, values): assert countifs(values, criteria) == result
def test_countifs_regular(self): assert 1 == countifs(((7, 25, 13, 25), ), 25, ((100, 102, 201, 20), ), ">100")
def test_countifs_odd_args_len(self): with pytest.raises(AssertionError): countifs(((7, 25, 13, 25), ), 25, ((100, 102, 201, 20), ))
def test_countifs_regular(self): self.assertEqual( countifs([7, 25, 13, 25], 25, [100, 102, 201, 20], ">100"), 1)
def test_countifs_odd_args_len(self): with pytest.raises(PyCelException): countifs(((7, 25, 13, 25), ), 25, ((100, 102, 201, 20), ))
def test_countifs_regular(self): assert 1 == countifs(((7, 25, 13, 25), ), 25, ((100, 102, 201, 20), ), ">100")
def test_countifs_regular(self): self.assertEqual(countifs([7, 25, 13, 25], 25, [100, 102, 201, 20], ">100"), 1)
def test_countifs_odd_args_len(self): with pytest.raises(PyCelException): countifs(((7, 25, 13, 25), ), 25, ((100, 102, 201, 20), ))