[issue37955] mock.patch incorrect reference to Mock
New submission from Paulo Henrique Silva <ph.silva@gmail.com>: 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). ---------- assignee: docs@python components: Documentation messages: 350537 nosy: docs@python, phsilva priority: normal severity: normal status: open title: mock.patch incorrect reference to Mock versions: Python 3.9 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue37955> _______________________________________
Change by Paulo Henrique Silva <ph.silva@gmail.com>: ---------- keywords: +patch pull_requests: +15204 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15521 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue37955> _______________________________________
Chris Withers <chris@withers.org> added the comment: New changeset 40c080934b3d49311209b1cb690c2ea1e04df7e7 by Chris Withers (Paulo Henrique Silva) in branch 'master': bpo-37955: correct mock.patch docs with respect to the returned type (GH-15521) https://github.com/python/cpython/commit/40c080934b3d49311209b1cb690c2ea1e04... ---------- nosy: +cjw296 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue37955> _______________________________________
Change by Chris Withers <chris@withers.org>: ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue37955> _______________________________________
participants (2)
-
Chris Withers -
Paulo Henrique Silva