Skip to content

Commit b8c30aa

Browse files
authored
Merge pull request #4097 from asottile/improve_doc_plugin_load
Fix formatting for plugin loading in conftest
2 parents c55d641 + aaaae0b commit b8c30aa

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

doc/en/plugins.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,15 @@ You may also discover more plugins through a `pytest- pypi.python.org search`_.
6969
Requiring/Loading plugins in a test module or conftest file
7070
-----------------------------------------------------------
7171

72-
You can require plugins in a test module or a conftest file like this::
72+
You can require plugins in a test module or a conftest file like this:
7373

74-
pytest_plugins = "myapp.testsupport.myplugin",
74+
.. code-block:: python
75+
76+
pytest_plugins = ("myapp.testsupport.myplugin",)
7577
7678
When the test module or conftest plugin is loaded the specified plugins
7779
will be loaded as well.
7880

79-
pytest_plugins = "myapp.testsupport.myplugin"
80-
81-
which will import the specified module as a ``pytest`` plugin.
82-
8381
.. note::
8482
Requiring plugins using a ``pytest_plugins`` variable in non-root
8583
``conftest.py`` files is deprecated. See

0 commit comments

Comments
 (0)