def test_dimension_mul(): length = mtr.Dimension(L=1) time = mtr.Dimension(T=1) assert (length * time)._d == dict(L=1, T=1, M=0, A=0, K=0, N=0, J=0)
def test_dimension_imul(): length = mtr.Dimension(L=1) time = mtr.Dimension(T=1) length *= time assert length._d == dict(L=1, T=1, M=0, A=0, K=0, N=0, J=0)
def test_dimension_neq_length_lengthsq(): length = mtr.Dimension(L=1) lengthsq = mtr.Dimension(L=2) assert length != lengthsq
def test_dimension_str_time(): time = mtr.Dimension(T=1) assert str(time) == "T"
def test_dimension_neq_length_time(): length = mtr.Dimension(L=1) time = mtr.Dimension(T=1) assert length != time
def test_dimension_eq_length(): length = mtr.Dimension(L=1) assert length == length
def test_dimension_ipow_zero(): length = mtr.Dimension(L=1) length **= 0 assert length._d == dict(L=0, T=0, M=0, A=0, K=0, N=0, J=0)
def test_dimension_str_mass(): mass = mtr.Dimension(M=1) assert str(mass) == "M"
def test_dimension_ipow_negative(): length = mtr.Dimension(L=1) length **= -2 assert length._d == dict(L=-2, T=0, M=0, A=0, K=0, N=0, J=0)