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

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)