def test_pow_known_Values(self):
        #__pow__ should give known result with known input
        #the unit of the power should be the power of the input units
        
        #test integer exponent
        x=units.PhysicalQuantity('5V')
        self.assertEqual((x**2).value,5**2)
        self.assertEqual((x**2).unit,x.unit**2)
        
        #test for inverse integer exponent
        x = units.PhysicalQuantity('1m**2')
        y = units.PhysicalQuantity('1m')
        self.assertEqual(x**(1.0/2.0),y)
        self.assertEqual(x/y,y)
        
        #test for error from non integer exponent
        try: 
            x**2.5
        except TypeError,err: 
            self.assertEqual(str(err),"Only integer and inverse integer exponents allowed")
        else: 
            self.fail("Expecting TypeError")
            
        #test for error on offset units
        x=units.PhysicalQuantity('1degC')
        try: 
            x**2
        except TypeError, err: 
            self.assertEqual(str(err),'cannot exponentiate units with non-zero offset')
        else: 
            self.fail("expected TypeError")
            
        #test for error if exponent is a PhysicalQuantity
        try: 
            x**x
        except TypeError, err: 
            self.assertEqual(str(err),'Exponents must be dimensionless')
        else: 
            self.fail("expected TypeError")
        try: #__rpow__
            2**x
        except TypeError, err: 
            self.assertEqual(str(err),'Exponents must be dimensionless')
        else: 
            self.fail("expected TypeError")
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.units/openmdao/units/test/test_units.py/test__PhysicalQuantity.test_pow_known_Values/original