def test_in_units_of(self):
        #in_units_of should return a new PhysicalQuantity with the requested unit, leaving the old unit as it was

        x=units.PhysicalQuantity('5cm')
        y = x.in_units_of('m')
        self.assertEqual(y,units.PhysicalQuantity('0.05m'))
        self.assertEqual(x,units.PhysicalQuantity('5cm'))
        
        x=units.PhysicalQuantity('5cm')
        try:
            y = x.in_units_of('degC')
        except __HOLE__,err:
            self.assertEqual(str(err),'Incompatible units')
        else: 
            self.fail("TypeError expected")
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.units/openmdao/units/test/test_units.py/test__PhysicalQuantity.test_in_units_of