Skip to content

Commit e92d373

Browse files
committed
Remove example of "monkeypatch" used in session scope
This is a leftover when invocation-scoped fixtures were pulled back. Fix #1872
1 parent 9c45d6c commit e92d373

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

doc/en/monkeypatch.rst

-20
Original file line numberDiff line numberDiff line change
@@ -54,26 +54,6 @@ This autouse fixture will be executed for each test function and it
5454
will delete the method ``request.session.Session.request``
5555
so that any attempts within tests to create http requests will fail.
5656

57-
example: setting an environment variable for the test session
58-
-------------------------------------------------------------
59-
60-
If you would like for an environment variable to be
61-
configured for the entire test session, you can add this to your
62-
top-level ``conftest.py`` file:
63-
64-
.. code-block:: python
65-
66-
# content of conftest.py
67-
@pytest.fixture(scope='session', autouse=True)
68-
def enable_debugging(monkeypatch):
69-
monkeypatch.setenv("DEBUGGING_VERBOSITY", "4")
70-
71-
This auto-use fixture will set the ``DEBUGGING_VERBOSITY`` environment variable for
72-
the entire test session.
73-
74-
Note that the ability to use a ``monkeypatch`` fixture from a ``session``-scoped
75-
fixture was added in pytest-3.0.
76-
7757

7858
Method reference of the monkeypatch fixture
7959
-------------------------------------------

0 commit comments

Comments
 (0)