def test_COUNTA_with_too_many_values(self): self.assertIsInstance(statistics.COUNTA([0] * 300), xl.ValueExcelError)
def test_COUNTA_with_bad_arg(self): self.assertIsInstance(statistics.COUNTA(None), xl.NullExcelError)
def test_COUNTA_without_any_values(self): self.assertIsInstance(statistics.COUNTA(), xl.NullExcelError)
def test_COUNTA(self): range0 = xl.RangeData([[1, 2], [3, 4]]) range1 = xl.RangeData([[2, 1], [3, '']]) self.assertEqual(statistics.COUNTA(range0), 4) self.assertEqual(statistics.COUNTA(range1), 3)