diff --git a/conftest.py b/conftest.py new file mode 100644 index 000000000..b7f607923 --- /dev/null +++ b/conftest.py @@ -0,0 +1,18 @@ +# (C) Copyright IBM 2023. +# +# This code is licensed under the Apache License, Version 2.0. You may +# obtain a copy of this license in the LICENSE.txt file in the root directory +# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. +# +# Any modifications or derivative works of this code must retain this +# copyright notice, and modified files need to carry a notice indicating +# that they have been altered from the originals. + +import pytest + +import ffsim + + +@pytest.fixture(autouse=True) +def add_ffsim(doctest_namespace): + doctest_namespace["ffsim"] = ffsim diff --git a/tox.ini b/tox.ini index 3c1c9439e..745289bc8 100644 --- a/tox.ini +++ b/tox.ini @@ -15,7 +15,7 @@ wheel_build_env = .pkg extras = dev commands = - pytest tests/ {posargs} + pytest --doctest-modules python/ tests/ {posargs} [testenv:coverage] description = check test coverage