doc: `import pytest` in `conftest.py` example in `doctest.rst`
This commit is contained in:
parent
b63bea9523
commit
9a4fd2e8f0
|
@ -224,9 +224,9 @@ place the objects you want to appear in the doctest namespace:
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
# content of conftest.py
|
# content of conftest.py
|
||||||
|
import pytest
|
||||||
import numpy
|
import numpy
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(autouse=True)
|
@pytest.fixture(autouse=True)
|
||||||
def add_np(doctest_namespace):
|
def add_np(doctest_namespace):
|
||||||
doctest_namespace["np"] = numpy
|
doctest_namespace["np"] = numpy
|
||||||
|
|
Loading…
Reference in New Issue