diff --git a/doc/en/how-to/doctest.rst b/doc/en/how-to/doctest.rst index 2cec984f9..c2a6cc8e9 100644 --- a/doc/en/how-to/doctest.rst +++ b/doc/en/how-to/doctest.rst @@ -227,6 +227,7 @@ place the objects you want to appear in the doctest namespace: import pytest import numpy + @pytest.fixture(autouse=True) def add_np(doctest_namespace): doctest_namespace["np"] = numpy