def test_dim_simplify_dimless(): # TODO: this should be somehow simplified on its own, # without the need of calling `dim_simplify`: assert dim_simplify( sin(L * L**-1)**2 * L).get_dimensional_dependencies() == L.get_dimensional_dependencies() assert dim_simplify( sin(L * L**(-1))**2 * L).get_dimensional_dependencies() == L.get_dimensional_dependencies()
def test_dim_simplify_dimless(): # TODO: this should be somehow simplified on its own, # without the need of calling `dim_simplify`: with warns_deprecated_sympy(): assert dim_simplify(sin(L*L**-1)**2*L).get_dimensional_dependencies()\ == dimsys_default.get_dimensional_dependencies(L) with warns_deprecated_sympy(): assert dim_simplify(sin(L * L**(-1))**2 * L).get_dimensional_dependencies()\ == dimsys_default.get_dimensional_dependencies(L)
def test_dim_simplify_dimless(): # TODO: this should be somehow simplified on its own, # without the need of calling `dim_simplify`: with warns_deprecated_sympy(): assert dim_simplify(sin(L*L**-1)**2*L).get_dimensional_dependencies()\ == dimsys_default.get_dimensional_dependencies(L) with warns_deprecated_sympy(): assert dim_simplify(sin(L * L**(-1))**2 * L).get_dimensional_dependencies()\ == dimsys_default.get_dimensional_dependencies(L)
def test_dim_simplify_dimless(): # TODO: this should be somehow simplified on its own, # without the need of calling `dim_simplify`: with warnings.catch_warnings(): warnings.filterwarnings("ignore", category=SymPyDeprecationWarning) assert dim_simplify(sin(L*L**-1)**2*L).get_dimensional_dependencies()\ == dimsys_default.get_dimensional_dependencies(L) assert dim_simplify(sin(L * L**(-1))**2 * L).get_dimensional_dependencies()\ == dimsys_default.get_dimensional_dependencies(L)
def test_dim_simplify_dimless(): # TODO: this should be somehow simplified on its own, # without the need of calling `dim_simplify`: with warnings.catch_warnings(): warnings.filterwarnings("ignore", category=SymPyDeprecationWarning) assert dim_simplify(sin(L*L**-1)**2*L).get_dimensional_dependencies()\ == dimsys_default.get_dimensional_dependencies(L) assert dim_simplify(sin(L * L**(-1))**2 * L).get_dimensional_dependencies()\ == dimsys_default.get_dimensional_dependencies(L)
def test_dim_simplify_rec(): with warnings.catch_warnings(): warnings.filterwarnings("ignore", category=SymPyDeprecationWarning) assert dim_simplify(Mul(Add(L, L), T)) == L * T assert dim_simplify((L + L) * T) == L * T
def test_dim_simplify_pow(): with warnings.catch_warnings(): warnings.filterwarnings("ignore", category=SymPyDeprecationWarning) assert dim_simplify(Pow(L, 2)) == L**2 assert dim_simplify(L**2) == L**2
def test_dim_simplify_add(): with warnings.catch_warnings(): warnings.filterwarnings("ignore", category=SymPyDeprecationWarning) assert dim_simplify(Add(L, L)) == L assert dim_simplify(L + L) == L
def test_dim_simplify_mul(): with warns_deprecated_sympy(): assert dim_simplify(Mul(L, T)) == L*T with warns_deprecated_sympy(): assert dim_simplify(L*T) == L*T
def test_dim_simplify_rec(): with warns_deprecated_sympy(): assert dim_simplify(Mul(Add(L, L), T)) == L * T with warns_deprecated_sympy(): assert dim_simplify((L + L) * T) == L * T
def test_dim_simplify_mul(): with warns_deprecated_sympy(): assert dim_simplify(Mul(L, T)) == L * T with warns_deprecated_sympy(): assert dim_simplify(L * T) == L * T
def test_dim_simplify_pow(): with warnings.catch_warnings(): warnings.filterwarnings("ignore", category=SymPyDeprecationWarning) assert dim_simplify(Pow(L, 2)) == L**2 assert dim_simplify(L**2) == L**2
def test_dim_simplify_rec(): assert dim_simplify(Mul(Add(L, L), T)) == L * T assert dim_simplify((L + L) * T) == L * T
def test_dim_simplify_pow(): assert dim_simplify(Pow(L, 2)) == L**2 assert dim_simplify(L**2) == L**2
def test_dim_simplify_mul(): assert dim_simplify(L * T) == L * T assert dim_simplify(L * T) == L * T
def test_dim_simplify_add(): assert dim_simplify(Add(L, L)) == L assert dim_simplify(L + L) == L
def test_dim_simplify_rec(): with warns_deprecated_sympy(): assert dim_simplify(Mul(Add(L, L), T)) == L*T with warns_deprecated_sympy(): assert dim_simplify((L + L) * T) == L*T
def test_dim_simplify_pow(): with warns_deprecated_sympy(): assert dim_simplify(Pow(L, 2)) == L**2 with warns_deprecated_sympy(): assert dim_simplify(L**2) == L**2
def test_dim_simplify_add(): with warnings.catch_warnings(): warnings.filterwarnings("ignore", category=SymPyDeprecationWarning) assert dim_simplify(Add(L, L)) == L assert dim_simplify(L + L) == L
def test_dim_simplify_add(): assert dim_simplify(Add(L, L)) == L assert dim_simplify(L + L) == L
def test_dim_simplify_rec(): with warnings.catch_warnings(): warnings.filterwarnings("ignore", category=SymPyDeprecationWarning) assert dim_simplify(Mul(Add(L, L), T)) == L*T assert dim_simplify((L + L) * T) == L*T
def test_dim_simplify_mul(): assert dim_simplify(Mul(L, T)) == L*T assert dim_simplify(L*T) == L*T
def test_dim_simplify_add(): with warns_deprecated_sympy(): assert dim_simplify(Add(L, L)) == L with warns_deprecated_sympy(): assert dim_simplify(L + L) == L
def test_dim_simplify_pow(): assert dim_simplify(Pow(L, 2)) == L**2 assert dim_simplify(L**2) == L**2
def test_dim_simplify_pow(): with warns_deprecated_sympy(): assert dim_simplify(Pow(L, 2)) == L**2 with warns_deprecated_sympy(): assert dim_simplify(L**2) == L**2
def test_dim_simplify_rec(): assert dim_simplify(Mul(Add(L, L), T)) == L*T assert dim_simplify((L + L) * T) == L*T
def test_dim_simplify_dimless(): # TODO: this should be somehow simplified on its own, # without the need of calling `dim_simplify`: assert dim_simplify(sin(L*L**-1)**2*L).get_dimensional_dependencies() == L.get_dimensional_dependencies() assert dim_simplify(sin(L * L**(-1))**2 * L).get_dimensional_dependencies() == L.get_dimensional_dependencies()
def test_dim_simplify_add(): with warns_deprecated_sympy(): assert dim_simplify(Add(L, L)) == L with warns_deprecated_sympy(): assert dim_simplify(L + L) == L