def test_inverse_quantity():
 q = u.Quantity(4.0, (u.meter / u.second))
 qot = (q / 2)
 toq = (2 / q)
 npqot = (q / np.array(2))
 assert (npqot.value == 2.0)
 assert (npqot.unit == (u.meter / u.second))
 assert (qot.value == 2.0)
 assert (qot.unit == (u.meter / u.second))
 assert (toq.value == 0.5)
 assert (toq.unit == (u.second / u.meter))

def test_inverse_quantity ( ) : q = u . Quantity ( 4.0 , ( u . meter / u . second ) ) qot = ( q / 2 ) toq = ( 2 / q ) npqot = ( q / np . array ( 2 ) ) assert ( npqot . value == 2.0 ) assert ( npqot . unit == ( u . meter / u . second ) ) assert ( qot . value == 2.0 ) assert ( qot . unit == ( u . meter / u . second ) ) assert ( toq . value == 0.5 ) assert ( toq . unit == ( u . second / u . meter ) )
regression test from issue #679 .