Пример #1
0
 def test_loop_float(self):
     self.assertAlmostEqual(2.3333333,
                            average_input_scores.average([2, 2, 3]))
Пример #2
0
 def test_loop_3(self):
     self.assertEquals(-20, average_input_scores.average([-10, -20, -30]))
Пример #3
0
 def test_loop(self):
     self.assertEqual(80,
                      average_input_scores.average([60, 70, 80, 90, 100]))
Пример #4
0
 def test_average(self):
     self.assertEqual(7, average_input_scores.average([5, 7, 9]))
Пример #5
0
 def test_invalid(self):
     self.assertRaises(ValueError, average_input_scores.average(["s"]))
 def test_average_not_equal_floats(self):
     self.assertNotEqual(91.34, a.average([99.4, 87.5, 93.1]))
Пример #7
0
 def test_average(self):
     self.assertEqual(85, average_input_scores.average([85, 90, 80]))
 def test_average_not_equal(self):
     self.assertNotEqual(99, a.average([91, 88, 96, 81]))
 def test_average_floats(self):
     self.assertEqual(89.88, a.average([92.3, 91.6, 89.2, 86.4]))
 def test_average(self):
     self.assertEqual(93.75, a.average([95, 99, 93, 88]))
Пример #11
0
 def test_something(self):
     self.assertEqual(90, average_input_scores.average([85, 90, 95]))
Пример #12
0
 def test_average(self):
     self.assertEqual(75, average([100, 50]))
     self.assertEqual(78.6, average([90, 60, 76, 79, 88]))
     self.assertEqual(71.83, average([100, 56, 89, 99, 67, 20]))
     self.assertEqual(79.33, average([88, 77, 56, 99, 89, 67]))
     self.assertEqual(50, average([50]))
Пример #13
0
 def test_average(self):
     self.assertEqual(
         77.2, average_input_scores.average([88, 90, 75, 62.5, 70.5]))
Пример #14
0
 def test_average(self):
     self.assertEqual(90, average_input_scores.average())