Mention `monkeypatch.undo()` in the docs

This commit is contained in:
Sviatoslav Sydorenko 2022-08-06 00:08:10 +02:00
parent f43ddd8acd
commit 1ffcb9224f
No known key found for this signature in database
GPG Key ID: 9345E8FEA89CA455
1 changed files with 2 additions and 1 deletions

View File

@ -42,7 +42,8 @@ def monkeypatch() -> Generator["MonkeyPatch", None, None]:
monkeypatch.chdir(path)
All modifications will be undone after the requesting test function or
fixture has finished. The ``raising`` parameter determines if a KeyError
fixture has finished. It is possible to undo them earlier by calling
``monkeypatch.undo()``. The ``raising`` parameter determines if a KeyError
or AttributeError will be raised if the set/deletion operation has no target.
"""
mpatch = MonkeyPatch()