Exemplo n.º 1
0
def test_definition():
    assert length.get_dimensional_dependencies() == {"length": 1}
    assert length.name == Symbol("length")
    assert length.symbol == Symbol("L")

    halflength = sqrt(length)
    assert halflength.get_dimensional_dependencies() == {'length': S.Half}
Exemplo n.º 2
0
def test_definition():
    assert length.get_dimensional_dependencies() == {"length": 1}
    assert length.name == Symbol("length")
    assert length.symbol == Symbol("L")

    halflength = sqrt(length)
    assert halflength.get_dimensional_dependencies() == {'length': S.Half}
Exemplo n.º 3
0
def test_Dimension_definition():
    with warns_deprecated_sympy():
        assert length.get_dimensional_dependencies() == {"length": 1}
    assert dimsys_default.get_dimensional_dependencies(length) == {"length": 1}
    assert length.name == Symbol("length")
    assert length.symbol == Symbol("L")

    halflength = sqrt(length)
    with warns_deprecated_sympy():
        assert halflength.get_dimensional_dependencies() == {"length": S.Half}
    assert dimsys_default.get_dimensional_dependencies(halflength) == {"length": S.Half}
Exemplo n.º 4
0
def test_Dimension_definition():
    with warns_deprecated_sympy():
        assert length.get_dimensional_dependencies() == {"length": 1}
    assert dimsys_default.get_dimensional_dependencies(length) == {"length": 1}
    assert length.name == Symbol("length")
    assert length.symbol == Symbol("L")

    halflength = sqrt(length)
    with warns_deprecated_sympy():
        assert halflength.get_dimensional_dependencies() == {"length": S.Half}
    assert dimsys_default.get_dimensional_dependencies(halflength) == {
        "length": S.Half
    }
Exemplo n.º 5
0
def test_Dimension_definition():
    with warnings.catch_warnings():
        warnings.filterwarnings("ignore", category=SymPyDeprecationWarning)
        assert length.get_dimensional_dependencies() == {"length": 1}
    assert dimsys_default.get_dimensional_dependencies(length) == {"length": 1}
    assert length.name == Symbol("length")
    assert length.symbol == Symbol("L")

    halflength = sqrt(length)
    with warnings.catch_warnings():
        warnings.filterwarnings("ignore", category=SymPyDeprecationWarning)
        assert halflength.get_dimensional_dependencies() == {"length": S.Half}
    assert dimsys_default.get_dimensional_dependencies(halflength) == {"length": S.Half}