File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1401,7 +1401,8 @@ patch
1401
1401
"as"; very useful if :func: `patch ` is creating a mock object for you.
1402
1402
1403
1403
:func: `patch ` takes arbitrary keyword arguments. These will be passed to
1404
- the :class: `Mock ` (or *new_callable *) on construction.
1404
+ :class: `AsyncMock ` if the patched object is asynchronous, to
1405
+ :class: `MagicMock ` otherwise or to *new_callable * if specified.
1405
1406
1406
1407
``patch.dict(...) ``, ``patch.multiple(...) `` and ``patch.object(...) `` are
1407
1408
available for alternate use-cases.
Original file line number Diff line number Diff line change @@ -1730,7 +1730,8 @@ def patch(
1730
1730
"as"; very useful if `patch` is creating a mock object for you.
1731
1731
1732
1732
`patch` takes arbitrary keyword arguments. These will be passed to
1733
- the `Mock` (or `new_callable`) on construction.
1733
+ `AsyncMock` if the patched object is asynchronous, to `MagicMock`
1734
+ otherwise or to `new_callable` if specified.
1734
1735
1735
1736
`patch.dict(...)`, `patch.multiple(...)` and `patch.object(...)` are
1736
1737
available for alternate use-cases.
You can’t perform that action at this time.
0 commit comments