nicer docstring for monkeypatch funcarg plugin

--HG--
branch : trunk
This commit is contained in:
holger krekel 2009-05-19 20:00:24 +02:00
parent 1973817f11
commit 637f35b4a6
1 changed files with 13 additions and 0 deletions

View File

@ -1,4 +1,17 @@
import os import os
"""
provides the "monkeypatch" funcarg for safely patching objects,
dictionaries and environment variables during the execution of
a test. There are three helper functions:
monkeypatch.setattr(obj, name, value)
monkeypatch.setitem(obj, name, value)
monkeypatch.setenv(name, value)
After the test run all such modifications will be undone,
which may even mean deleting the attribute or dictionary entry
if it didn't exist before.
"""
def pytest_funcarg__monkeypatch(request): def pytest_funcarg__monkeypatch(request):
monkeypatch = MonkeyPatch() monkeypatch = MonkeyPatch()