Пример #1
0
 def test1(self):
     self.assertEqual(average.averageList([1, 2, 3]), 2)
Пример #2
0
 def test2(self):
     self.assertEqual(average.averageList([-1, -2, -3]), -2)
Пример #3
0
 def test3(self):
     self.assertEqual(average.averageList([]), "Error")
Пример #4
0
 def test_float(self):
     self.assertEqual(average.averageList([1.2, 3.5, 4.6, 5.7]), 3.75)
Пример #5
0
 def test_normal(self):
     self.assertEqual(average.averageList([1, 2, 3, 4, 5]), 3.0)
Пример #6
0
 def test_div_by_zero(self):
     self.assertEqual(average.averageList([]), None)
Пример #7
0
 def test_negative(self):
     self.assertEqual(average.averageList([-1, -2, -3, -4, -5]), -3.0)