From aaaae0b232a26cae41eed5b89a09f774f31b2f3b Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Tue, 9 Oct 2018 09:30:56 -0700 Subject: [PATCH] Fix formatting for plugin loading in conftest --- doc/en/plugins.rst | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/doc/en/plugins.rst b/doc/en/plugins.rst index 9ddba5d38..62456e7dd 100644 --- a/doc/en/plugins.rst +++ b/doc/en/plugins.rst @@ -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