diff options
author | Ran Benita <ran@unusedvar.com> | 2021-02-04 10:13:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-04 10:13:27 +0200 |
commit | 3907856cb3748c3210e796f199c0625046d20896 (patch) | |
tree | aa882195c58e0513b58de5ea52bafde17067bf8a /doc | |
parent | 275174e14795314f36b068ea757eaf032a3f8dc1 (diff) | |
parent | f0f19aa8d960dc71eaa00a0f01d3459a9626bbea (diff) | |
download | pytest-3907856cb3748c3210e796f199c0625046d20896.tar.gz |
Merge pull request #8297 from pytest-dev/monkeypatch-docs
doc: Point out two-argument form of monkeypatch.setattr
Diffstat (limited to 'doc')
-rw-r--r-- | doc/en/monkeypatch.rst | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/doc/en/monkeypatch.rst b/doc/en/monkeypatch.rst index 9480f008f..4964ee548 100644 --- a/doc/en/monkeypatch.rst +++ b/doc/en/monkeypatch.rst @@ -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) |