Skip to content

Commit

Permalink
Typo in example, os.getcwd does not take any parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienPalard committed Mar 12, 2018
1 parent 28df322 commit e71d907
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _pytest/monkeypatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def setattr(self, target, name, value=notset, raising=True):
For convenience you can specify a string as ``target`` which
will be interpreted as a dotted import path, with the last part
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.
The ``raising`` value determines if the setattr should fail
Expand Down

0 comments on commit e71d907

Please sign in to comment.