Skip to content

Commit 3907856

Browse files
authored
Merge pull request #8297 from pytest-dev/monkeypatch-docs
doc: Point out two-argument form of monkeypatch.setattr
2 parents 275174e + f0f19aa commit 3907856

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

doc/en/monkeypatch.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ functionality in tests:
1616
.. code-block:: python
1717
1818
monkeypatch.setattr(obj, name, value, raising=True)
19+
monkeypatch.setattr("somemodule.obj.name", value, raising=True)
1920
monkeypatch.delattr(obj, name, raising=True)
2021
monkeypatch.setitem(mapping, name, value)
2122
monkeypatch.delitem(obj, name, raising=True)

0 commit comments

Comments
 (0)