Clarify 'getfixture' needs to access fixtures by normal means

Related to #7497
This commit is contained in:
Bruno Oliveira 2020-07-14 20:20:23 -03:00
parent 358150c30e
commit 97f560d4d1
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.