Beispiel #1
0
 def test_two(self):
     self.assertEqual(HW4.avg('five'), "Type Error")
     self.assertEqual(HW4.avg(0), "Type Error")
     self.assertEqual(HW4.avg('0'), "Type Error")
Beispiel #2
0
 def test_three(self):
     self.assertEqual(HW4.avg([1, 3]), 2)
     self.assertEqual(HW4.avg([3, 5, 7]), 5)
     self.assertEqual(HW4.avg([-3, -7, -5]), -5)
Beispiel #3
0
 def test_one(self):
     self.assertEqual(HW4.avg([]), "Zero Division")
     self.assertEqual(HW4.avg([-5]), -5)
     self.assertEqual(HW4.avg([5]), 5)