Merge pull request #3300 from JulienPalard/typo
Typo in example, os.getcwd does not take any parameter.
This commit is contained in:
commit
3909225bf9
|
@ -113,7 +113,7 @@ class MonkeyPatch(object):
|
||||||
For convenience you can specify a string as ``target`` which
|
For convenience you can specify a string as ``target`` which
|
||||||
will be interpreted as a dotted import path, with the last part
|
will be interpreted as a dotted import path, with the last part
|
||||||
being the attribute name. Example:
|
being the attribute name. Example:
|
||||||
``monkeypatch.setattr("os.getcwd", lambda x: "/")``
|
``monkeypatch.setattr("os.getcwd", lambda: "/")``
|
||||||
would set the ``getcwd`` function of the ``os`` module.
|
would set the ``getcwd`` function of the ``os`` module.
|
||||||
|
|
||||||
The ``raising`` value determines if the setattr should fail
|
The ``raising`` value determines if the setattr should fail
|
||||||
|
|
Loading…
Reference in New Issue