def test_mul_known_Values(self):
        #multiplication should give known result with known input
        #the unit of the product should be the product of the units

        #PhysicalQuanity * scalar
        x=units.PhysicalQuantity('1cm')
        y = 12.3
        self.assertEqual(x*y,units.PhysicalQuantity('12.3cm'))
        self.assertEqual(y*x,units.PhysicalQuantity('12.3cm'))
        
        #PhysicalQuantity * PhysicalQuantity
        x=units.PhysicalQuantity('1cm')
        y=units.PhysicalQuantity('1cm')
        z=units.PhysicalQuantity('1cm**-1')
        self.assertEqual((x*y).value,1)
        self.assertEqual((x*y).unit,x.unit*y.unit)
        self.assertEqual(str(x*y),'1.0 cm**2')
        
        #multiplication where the result is dimensionless
        self.assertEqual((x*z),1.0)
        self.assertEqual(type(x*z),float)
        self.assertEqual(str(x*z),'1.0')
        
        x=units.PhysicalQuantity('7kg')
        y=units.PhysicalQuantity('10.5m')
        self.assertEqual((x*y).value,73.5)
        self.assertEqual((x*y).unit,x.unit*y.unit)
        self.assertEqual(str(x*y),'73.5 m*kg')
        
        #test for error from offset units
        z = units.PhysicalQuantity('1degC')
        try: 
            x*z
        except __HOLE__,err: 
            self.assertEqual(str(err),"cannot multiply units with non-zero offset")
        else: 
            self.fail("TypeError expected")
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.units/openmdao/units/test/test_units.py/test__PhysicalQuantity.test_mul_known_Values