From dadf03baeaeda0b3e585c5cb7967da1f39a8f5e8 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 12 Oct 2015 06:57:43 +0200 Subject: [PATCH] Use a string for pytest_plugins in docs. --- doc/en/writing_plugins.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/en/writing_plugins.rst b/doc/en/writing_plugins.rst index bc738f513..4d7c747ff 100644 --- a/doc/en/writing_plugins.rst +++ b/doc/en/writing_plugins.rst @@ -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 :py:class:`testdir <_pytest.pytester.Testdir>` fixture via specifying a 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 can use like this:: # content of test_myplugin.py - pytest_plugins = pytester # to get testdir fixture + pytest_plugins = "pytester" # to get testdir fixture def test_myplugin(testdir): testdir.makepyfile("""