summaryrefslogtreecommitdiffstats
path: root/Doc/library/unittest.mock.rst
diff options
context:
space:
mode:
authorPaulo Henrique Silva <ph.silva@gmail.com>2020-01-25 10:53:54 (GMT)
committerChris Withers <chris@withers.org>2020-01-25 10:53:54 (GMT)
commit40c080934b3d49311209b1cb690c2ea1e04df7e7 (patch)
tree57229d44d35b10601bdfa87cc725122041a27da5 /Doc/library/unittest.mock.rst
parent62865f4532094017a9b780b704686ca9734bc329 (diff)
downloadcpython-40c080934b3d49311209b1cb690c2ea1e04df7e7.zip
cpython-40c080934b3d49311209b1cb690c2ea1e04df7e7.tar.gz
cpython-40c080934b3d49311209b1cb690c2ea1e04df7e7.tar.bz2
bpo-37955: correct mock.patch docs with respect to the returned type (GH-15521)
Diffstat (limited to 'Doc/library/unittest.mock.rst')
-rw-r--r--Doc/library/unittest.mock.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/library/unittest.mock.rst b/Doc/library/unittest.mock.rst
index 8394304..515bdd0 100644
--- a/Doc/library/unittest.mock.rst
+++ b/Doc/library/unittest.mock.rst
@@ -1401,7 +1401,8 @@ 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.
+ :class:`AsyncMock` if the patched object is asynchronous, to
+ :class:`MagicMock` otherwise or to *new_callable* if specified.
``patch.dict(...)``, ``patch.multiple(...)`` and ``patch.object(...)`` are
available for alternate use-cases.