Пример #1
0
 def test_multiple_ints_invalid_argument_values(self):
     with self.assertRaises(ValueError):
         multiple_ints(6.0, 2)
         multiple_ints([12, 5, 7], 2)
         multiple_ints("Some useful text from from your teacher", 2)
         multiple_ints(True, 2)
Пример #2
0
 def test_multiple_ints_with_conversion_invalid_values(self):
     with self.assertRaises(ValueError):
         multiple_ints("Some useful text from your teacher", 2)
         multiple_ints([12, 6, 98], 2)
Пример #3
0
 def test_multiple_ints_good_values(self):
     self.assertEqual(multiple_ints(6, 0), 0)
     self.assertEqual(multiple_ints(12, 2), 24)