Use a string for pytest_plugins in docs.

This commit is contained in:
Florian Bruhin 2015-10-12 06:57:43 +02:00
parent 1525cc78f6
commit dadf03baea
1 changed files with 2 additions and 2 deletions

View File

@ -203,13 +203,13 @@ pytest comes with some facilities that you can enable for testing your
plugin. Given that you have an installed plugin you can enable the plugin. Given that you have an installed plugin you can enable the
:py:class:`testdir <_pytest.pytester.Testdir>` fixture via specifying a :py:class:`testdir <_pytest.pytester.Testdir>` fixture via specifying a
command line option to include the pytester plugin (``-p pytester``) or command line option to include the pytester plugin (``-p pytester``) or
by putting ``pytest_plugins = pytester`` into your test or by putting ``pytest_plugins = "pytester"`` into your test or
``conftest.py`` file. You then will have a ``testdir`` fixure which you ``conftest.py`` file. You then will have a ``testdir`` fixure which you
can use like this:: can use like this::
# content of test_myplugin.py # content of test_myplugin.py
pytest_plugins = pytester # to get testdir fixture pytest_plugins = "pytester" # to get testdir fixture
def test_myplugin(testdir): def test_myplugin(testdir):
testdir.makepyfile(""" testdir.makepyfile("""