Skip to content

Commit

Permalink
bpo-37955: mock.patch incorrect reference to Mock
Browse files Browse the repository at this point in the history
mock.patch mentions that keyword arguments are passed
to Mock when it passes to MagicMock by default.

This PR fixes that.
  • Loading branch information
Paulo Henrique Silva committed Aug 26, 2019
1 parent b3b9619 commit 6578726
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Doc/library/unittest.mock.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1369,7 +1369,7 @@ patch
"as"; very useful if :func:`patch` is creating a mock object for you.

:func:`patch` takes arbitrary keyword arguments. These will be passed to
the :class:`Mock` (or *new_callable*) on construction.
the :class:`MagicMock` (or *new_callable*) on construction.

``patch.dict(...)``, ``patch.multiple(...)`` and ``patch.object(...)`` are
available for alternate use-cases.
Expand Down
2 changes: 1 addition & 1 deletion Lib/unittest/mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -1651,7 +1651,7 @@ def patch(
"as"; very useful if `patch` is creating a mock object for you.
`patch` takes arbitrary keyword arguments. These will be passed to
the `Mock` (or `new_callable`) on construction.
the `MagicMock` (or `new_callable`) on construction.
`patch.dict(...)`, `patch.multiple(...)` and `patch.object(...)` are
available for alternate use-cases.
Expand Down

0 comments on commit 6578726

Please sign in to comment.