Skip to content

Commit

Permalink
Merge pull request #3300 from JulienPalard/typo
Browse files Browse the repository at this point in the history
Typo in example, os.getcwd does not take any parameter.
  • Loading branch information
nicoddemus authored Mar 12, 2018
2 parents 28df322 + e71d907 commit 3909225
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 3909225

Please sign in to comment.