示例#1
0
 def test_multiply(self):
     # implement number.multiply
     self.assertEquals(number.multiply(1,2), 2)
     self.assertEquals(number.multiply(10,2), 20)
 def test_multiply(self):
     self.assertEqual(number.multiply(1, 2), 2)
     self.assertEqual(number.multiply(4, 2), 8)
示例#3
0
 def test_multiply_should_handle_strings(self):
     # Modify number.multiply to work also if arguments are given as strings
     self.assertEquals(number.multiply("2", "5"), 10)
     self.assertEquals(number.multiply(4, "5"), 20)
 def test_multiply_should_handle_strings(self):
     self.assertEqual(number.multiply('1', '2'), 2)
     self.assertEqual(number.multiply('4', '2'), 8)