def test_cmp(self):
        #should error for incompatible units, if they are compatible then it should cmp on their factors
        x=units.PhysicalQuantity('1 d')
        y=units.PhysicalQuantity('1 s')
        z=units.PhysicalQuantity('1 ft')
        
        self.assertEqual(cmp(x,y),1)
        self.assertEqual(cmp(x,x),0)
        self.assertEqual(cmp(y,x),-1)
        
        try:
            cmp(x,z)
        except __HOLE__,err:
            self.assertEqual(str(err),"Incompatible units")
        else:
            self.fail("Expecting TypeError")
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.units/openmdao/units/test/test_units.py/test__PhysicalUnit.test_cmp