Beispiel #1
0
 def test_SUMIF_with_invalid_sum_range(self):
     # In this case, "bad" is converted to a single item array, then
     # filtered to an array where the value is 0, so that the sum is always
     # 0.
     self.assertEqual(math.SUMIF([0, 1, 2, 3], ">=2", 'bad'), 0)
Beispiel #2
0
 def test_SUMIF_unspecified_sum_range(self):
     self.assertEqual(math.SUMIF([0, 1, 2, 3], ">=2"), 5)
Beispiel #3
0
 def test_SUMIF(self):
     self.assertEqual(math.SUMIF([0, 1, 2], '>=1', [10, 20, 30]), 50)
Beispiel #4
0
 def test_SUMIF_invalid_criteria(self):
     self.assertIsInstance(math.SUMIF([0, 1, 2], [0, 1], [10, 20, 30]),
                           xlerrors.ValueExcelError)
Beispiel #5
0
 def test_SUMIF_text(self):
     self.assertEqual(math.SUMIF(['a', 'b', 'A'], '=a', [10, 20, 30]), 40)