def test_division(self):
        #division should error when working with offset units
        
        w = units.PhysicalQuantity('2kg')
        x = units.PhysicalQuantity('1g')
        y = units.PhysicalQuantity('2s')
        z = units.PhysicalQuantity('1 degC')
        
        quo = w.unit/x.unit
        quo2 = x.unit/y.unit

        self.assertEqual(quo,units.PhysicalUnit({'kg': 1, 'g': -1},
                                                1000.0, _get_powers(),0))
        self.assertEqual(quo2,units.PhysicalUnit({'s': -1, 'g': 1},
                                                 0.001,
                                                 _get_powers(mass=1, time=-1),0))
        quo = y.unit/2.0
        self.assertEqual(quo,units.PhysicalUnit({'s': 1, "2.0":-1},
                                                .5, _get_powers(time=1), 0))
        quo = 2.0/y.unit
        self.assertEqual(quo,units.PhysicalUnit({'s': -1,"2.0":1},2,
                                                _get_powers(time=-1),0))        
        try:
            x.unit / z.unit
        except TypeError,err:
            self.assertEqual(str(err),"cannot divide units with non-zero offset")
        else: 
            self.fail("Expecting TypeError")
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.units/openmdao/units/test/test_units.py/test__PhysicalUnit.test_division/original