From 9a4fd2e8f00d920772e3ad20181b6c68f22fed13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20L=C3=B3pez-Ib=C3=A1=C3=B1ez?= <2620021+MLopez-Ibanez@users.noreply.github.com> Date: Wed, 3 Apr 2024 10:59:33 +0100 Subject: [PATCH 1/2] doc: `import pytest` in `conftest.py` example in `doctest.rst` --- doc/en/how-to/doctest.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/how-to/doctest.rst b/doc/en/how-to/doctest.rst index f70d28ce135..2cec984f907 100644 --- a/doc/en/how-to/doctest.rst +++ b/doc/en/how-to/doctest.rst @@ -224,9 +224,9 @@ place the objects you want to appear in the doctest namespace: .. code-block:: python # content of conftest.py + import pytest import numpy - @pytest.fixture(autouse=True) def add_np(doctest_namespace): doctest_namespace["np"] = numpy From aa3284438a4eb847052bf7b3e201fa7e06839ec0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 3 Apr 2024 10:02:54 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- doc/en/how-to/doctest.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/en/how-to/doctest.rst b/doc/en/how-to/doctest.rst index 2cec984f907..c2a6cc8e958 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