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)
def test_multiply_non_int_type(self): with self.assertRaises(TypeError): Calculator.product(3, "j")
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)