예제 #1
0
 def test_COUNT(self):
     range0 = func_xltypes.Array([[1, 2], [3, 4]])
     range1 = func_xltypes.Array([[1, 2], [3, 'SPAM']])
     self.assertEqual(statistics.COUNT(range0), 4)
     self.assertEqual(statistics.COUNT(range1), 3)
     self.assertEqual(statistics.COUNT(range0, range1), 7)
     self.assertEqual(statistics.COUNT(range0, range1, 1), 8)
     self.assertEqual(statistics.COUNT(range0, range1, 1, 'SPAM'), 8)
예제 #2
0
 def test_COUNT_with_too_many_values(self):
     self.assertIsInstance(
         statistics.COUNT([0] * 300), xlerrors.ValueExcelError)
예제 #3
0
 def test_COUNT_without_any_values(self):
     self.assertIsInstance(
         statistics.COUNT(), xlerrors.ValueExcelError)