Merge pull request #8297 from pytest-dev/monkeypatch-docs

doc: Point out two-argument form of monkeypatch.setattr
This commit is contained in:
Ran Benita 2021-02-04 10:13:27 +02:00 committed by GitHub
commit 3907856cb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -16,6 +16,7 @@ functionality in tests:
.. code-block:: python
monkeypatch.setattr(obj, name, value, raising=True)
monkeypatch.setattr("somemodule.obj.name", value, raising=True)
monkeypatch.delattr(obj, name, raising=True)
monkeypatch.setitem(mapping, name, value)
monkeypatch.delitem(obj, name, raising=True)