Merge pull request #1130 from The-Compiler/pytest_doc_fix
Use a string for pytest_plugins in docs.
This commit is contained in:
commit
0c21533cc5
|
@ -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("""
|
||||
|
|
Loading…
Reference in New Issue