Skip to content

Commit

Permalink
Merge pull request pytest-dev#4097 from asottile/improve_doc_plugin_load
Browse files Browse the repository at this point in the history
Fix formatting for plugin loading in conftest
  • Loading branch information
asottile authored Oct 9, 2018
2 parents c55d641 + aaaae0b commit b8c30aa
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions doc/en/plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,15 @@ You may also discover more plugins through a `pytest- pypi.python.org search`_.
Requiring/Loading plugins in a test module or conftest file
-----------------------------------------------------------

You can require plugins in a test module or a conftest file like this::
You can require plugins in a test module or a conftest file like this:

pytest_plugins = "myapp.testsupport.myplugin",
.. code-block:: python
pytest_plugins = ("myapp.testsupport.myplugin",)
When the test module or conftest plugin is loaded the specified plugins
will be loaded as well.

pytest_plugins = "myapp.testsupport.myplugin"

which will import the specified module as a ``pytest`` plugin.

.. note::
Requiring plugins using a ``pytest_plugins`` variable in non-root
``conftest.py`` files is deprecated. See
Expand Down

0 comments on commit b8c30aa

Please sign in to comment.