예제 #1
0
 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
예제 #2
0
 def test_countifs_odd_args_len(self):
     with pytest.raises(PyCelException):
         countifs([7, 25, 13, 25], 25, [100, 102, 201, 20])
예제 #3
0
 def test_countifs_regular(self):
     assert 1 == countifs([7, 25, 13, 25], 25, [100, 102, 201, 20], ">100")
예제 #4
0
 def test_countifs(result, criteria, values):
     assert countifs(values, criteria) == result
예제 #5
0
 def test_countifs_regular(self):
     assert 1 == countifs(((7, 25, 13, 25), ), 25, ((100, 102, 201, 20), ),
                          ">100")
예제 #6
0
 def test_countifs_odd_args_len(self):
     with pytest.raises(AssertionError):
         countifs(((7, 25, 13, 25), ), 25, ((100, 102, 201, 20), ))
예제 #7
0
 def test_countifs_regular(self):
     self.assertEqual(
         countifs([7, 25, 13, 25], 25, [100, 102, 201, 20], ">100"), 1)
예제 #8
0
 def test_countifs_odd_args_len(self):
     with pytest.raises(PyCelException):
         countifs(((7, 25, 13, 25), ), 25, ((100, 102, 201, 20), ))
예제 #9
0
 def test_countifs_regular(self):
     assert 1 == countifs(((7, 25, 13, 25), ), 25,
                          ((100, 102, 201, 20), ), ">100")
예제 #10
0
 def test_countifs_regular(self):
     self.assertEqual(countifs([7, 25, 13, 25], 25, [100, 102, 201, 20], ">100"), 1)
예제 #11
0
 def test_countifs_odd_args_len(self):
     with pytest.raises(PyCelException):
         countifs(((7, 25, 13, 25), ), 25, ((100, 102, 201, 20), ))