Beispiel #1
0
def test_nested_modules():
    import pybind11_tests
    from pybind11_tests.submodule import submodule_func

    assert pybind11_tests.__name__ == "pybind11_tests"
    assert pybind11_tests.submodule.__name__ == "pybind11_tests.submodule"

    assert submodule_func() == "submodule_func()"
Beispiel #2
0
def test_nested_modules():
    import pybind11_tests
    from pybind11_tests.submodule import submodule_func

    assert pybind11_tests.__name__ == "pybind11_tests"
    assert pybind11_tests.submodule.__name__ == "pybind11_tests.submodule"

    assert submodule_func() == "submodule_func()"
def test_nested_modules():
    import pybind11_tests
    from pybind11_tests.submodule import submodule_func

    if pybind11_tests.__name__ != "pybind11_tests":
        raise AssertionError
    if pybind11_tests.submodule.__name__ != "pybind11_tests.submodule":
        raise AssertionError

    if submodule_func() != "submodule_func()":
        raise AssertionError