def test_power2(self): data2 = power(4, 3) self.assertEqual(data2, 64)
def test_power(self): data = power(2, 3) self.assertEqual(data, 8)
def testHighNumber(self): data1, data2 = 10, 5 result = power(data1, data2) self.assertEqual(result, 100000)
def testZeroPower(self): data1, data2 = 4, 0 result = power(data1, data2) self.assertEqual(result, 1)
def testHighPower(self): data1, data2 = 2, 10 result = power(data1, data2) self.assertEqual(result, 1024)
def testZeroNumber(self): data1, data2 = 0, 4 result = power(data1, data2) self.assertEqual(result, 0)
def test_power2(self): result = power(6,9,1) self.assertEqual(result,10077696)
def testOnePower(self): data1, data2 = 3, 1 result = power(data1, data2) self.assertEqual(result, 3)
def testPowerNormal(self): resultA = power(2, 2) resultB = powerH(2, 2) self.assertEqual(resultA, 4) self.assertEqual(resultB, 4)
def test_power(self): result = power(8,6,1) self.assertEqual(result,262144)
def testPowerOne(self): resultA = power(2, 1) resultB = powerH(2, 1) self.assertEqual(resultA, 2) self.assertEqual(resultB, 2)
def testPowerZero(self): resultA = power(2, 0) resultB = powerH(2, 0) self.assertEqual(resultA, 1) self.assertEqual(resultB, 1)
def testPowerNegative(self): resultA = power(2, -1) resultB = powerH(2, -1) self.assertEqual(resultA, "Invalid input") self.assertEqual(resultB, "Invalid input")
def testPowerExtreme(self): resultA = power(2, 100) resultB = powerH(2, 100) self.assertEqual(resultA, 1267650600228229401496703205376) self.assertEqual(resultB, 1267650600228229401496703205376)
def testPower(self): self.assertEqual(power(0, 0), 1) self.assertEqual(power(1, 0), 1) self.assertEqual(power(2, 5), 32)