def test_medium_input_two(self):
     with self.assertRaises(Exception):
         self.assertEqual(avg(10, 10, 10, 10, '10'), 10)
 def test_hard_input(self):
     with self.assertRaises(Exception):
         self.assertEqual(avg(1, 2, 3, None), 2)
 def test_medium_input_two(self):
     with self.assertRaises(TypeError):
         self.assertEqual(avg(1, 2, "3"), 2)
 def test_medium_input(self):
     with self.assertRaises(Exception):
         self.assertEqual(avg(1, 2, 3, 'Joanna'), 2)
 def test_medium_input_2(self):
     with self.assertRaises(TypeError):
         self.assertEqual(avg(10, 10, "10"), 10)
 def test_easy_input(self):
     self.assertEqual(avg(1, 2, 3), 2.0)
Exemple #7
0
 def test_hard_input_four(self):
     with self.assertRaises(TypeError):
         self.assertEqual(avg(1, 2, 3, 4, 5, 6, 7, frozenset), 4)
 def test_hard_input_four(self):
     with self.assertRaises(Exception):
         self.assertEqual(avg(10, 10, 10, 10, set), 10)
Exemple #9
0
 def test_medium_input_two(self):
     with self.assertRaises(TypeError):
         self.assertEqual(avg(1, 2, 3, 4, 5, 6, 7, "100"), 4)
Exemple #10
0
 def test_hard_input_three(self):
     with self.assertRaises(TypeError):
         self.assertEqual(avg(1, 2, 3, 4, 5, 6, 7, set), 4)
Exemple #11
0
 def test_hard_input_three(self):
     with self.assertRaises(TypeError):
         self.assertEqual(avg(10, 10, 10, 10, frozenset), 10)
 def test_hard_input_four(self):
     with self.assertRaises(TypeError):
         self.assertEqual(avg(1, 2, set), 2)
 def test_hard_input_two(self):
     with self.assertRaises(TypeError):
         self.assertEqual(avg(1, 2, float), 2)
 def test_hard_input_two(self):
     with self.assertRaises(Exception):
         self.assertEqual(avg(10, 10, 10, 10, 1.5), 10)
Exemple #15
0
 def test_easy_input(self):
     self.assertEqual(avg(1, 2, 3, 4, 5, 6, 7), 4)
     pass
 def test_hard_input_three(self):
     with self.assertRaises(Exception):
         self.assertEqual(avg(10, 10, 10, 10, frozenset), 10)
 def test_easy_input_three(self):
     # True jest traktowane jako liczba 1
     self.assertEqual(avg(1, 1, 1, 1, 1, True), 1)
 def test_medium_input(self):
     with self.assertRaises(TypeError):
         self.assertEqual(avg(1, 2, 3, "Mohammad"), 2.0)
 def test_hard_input(self):
     with self.assertRaises(TypeError):
         self.assertEqual(avg(1,2,3,4, None), 2)
 def test_hard_input_4(self):
     with self.assertRaises(TypeError):
         self.assertEqual(avg(10, 10, set), 10)
 def test_hard_input_three(self):
     #not significat
     with self.assertRaises(TypeError):
         self.assertEqual(avg(10, 10, 10, 10, 10, set), 10)
 def test_easy_input_2(self):
     self.assertEqual(avg(10, 10, 10), 10)
 def test_medium_input(self):
     with self.assertRaises(TypeError):
         self.assertEqual(avg(1, 2, 3, "Augusto"), 2)