def test_pow(self):
        #power should error for offest units and for non-integer powers

        x = units.PhysicalQuantity('1m')
        y = units.PhysicalQuantity('1degF')
        
        z = x**3
        self.assertEqual(z.unit,units.PhysicalQuantity('1m**3').unit)
        x = z**(3.0/1.0) #checks inverse integer units
        self.assertEqual(x.unit,units.PhysicalQuantity('1m').unit)
        
        #test offset units: 
        try: 
            y**17
        except TypeError,err:
            self.assertEqual(str(err),'cannot exponentiate units with non-zero offset')
        else:
            self.fail('Expecting TypeError')
        
        #test non-integer powers   
        try: 
            x**1.2
        except TypeError,err:
            self.assertEqual(str(err),'Only integer and inverse integer exponents allowed')
        else:
            self.fail('Expecting TypeError')      
        try: 
            x**(5.0/2.0)
        except TypeError,err:
            self.assertEqual(str(err),'Only integer and inverse integer exponents allowed')
        else:
            self.fail('Expecting TypeError')
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.units/openmdao/units/test/test_units.py/test__PhysicalUnit.test_pow/swapped operands of `/`