示例#1
0
 def test_multiply_result_type(self):
     self.assertIsInstance(Calculator.product(3, 3), int)
     self.assertIsInstance(Calculator.product(5, 2), int)
     self.assertIsInstance(Calculator.product(100, 5), int)
示例#2
0
 def test_multiply_non_int_type(self):
     with self.assertRaises(TypeError):
         Calculator.product(3, "j")
示例#3
0
 def test_multiply_result(self):
     self.assertEquals(Calculator.product(3, 3), 9)
     self.assertEquals(Calculator.product(5, 2), 10)
     self.assertEquals(Calculator.product(100, 5), 500)