Title: mock.patch incorrect reference to Mock
Type: Stage: patch review
Components: Documentation Versions: Python 3.9
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, phsilva
Priority: normal Keywords: patch

Created on 2019-08-26 15:11 by phsilva, last changed 2019-08-26 15:24 by phsilva.

Pull Requests
URL Status Linked Edit
PR 15521 open phsilva, 2019-08-26 15:24
Messages (1)
msg350537 - (view) Author: Paulo Henrique Silva (phsilva) * Date: 2019-08-26 15:11
When explaining the usage of keyword arguments on mock.patch:

patch() takes arbitrary keyword arguments. These will be passed to the Mock (or new_callable) on construction.

default new_callable is MagicMock and it should be mentioned here instead of Mock (even tough MagickMock inherits from it).
Date User Action Args
2019-08-26 15:24:55phsilvasetkeywords: + patch
stage: patch review
pull_requests: + pull_request15204
2019-08-26 15:11:48phsilvacreate