Merge pull request #7501 from nicoddemus/doctest-fixtures

Clarify 'getfixture' needs to access fixtures by normal means
This commit is contained in:
Bruno Oliveira 2020-07-15 09:30:13 -03:00 committed by GitHub
commit 9c2c5d9f05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -206,7 +206,11 @@ It is possible to use fixtures using the ``getfixture`` helper:
>>> ...
>>>
Also, :ref:`usefixtures` and :ref:`autouse` fixtures are supported
Note that the fixture needs to be defined in a place visible by pytest, for example a `conftest.py`
file or plugin; normal python files containing docstrings are not normally scanned for fixtures
unless explicitly configured by :confval:`python_files`.
Also, the :ref:`usefixtures <usefixtures>` mark and fixtures marked as :ref:`autouse <autouse>` are supported
when executing text doctest files.