mirror of
https://github.com/python/cpython.git
synced 2025-10-06 23:21:06 +00:00
bpo-44534: fix wording and docstring sync in unittest.Mock GH27000
This commit is contained in:
parent
a9a69bb3ea
commit
abb08e3af6
2 changed files with 6 additions and 1 deletions
|
@ -262,7 +262,7 @@ the *new_callable* argument to :func:`patch`.
|
||||||
this is a new Mock (created on first access). See the
|
this is a new Mock (created on first access). See the
|
||||||
:attr:`return_value` attribute.
|
:attr:`return_value` attribute.
|
||||||
|
|
||||||
* *unsafe*: By default, accessing any attribute with name starting with
|
* *unsafe*: By default, accessing any attribute whose name starts with
|
||||||
*assert*, *assret*, *asert*, *aseert* or *assrt* will raise an
|
*assert*, *assret*, *asert*, *aseert* or *assrt* will raise an
|
||||||
:exc:`AttributeError`. Passing ``unsafe=True`` will allow access to
|
:exc:`AttributeError`. Passing ``unsafe=True`` will allow access to
|
||||||
these attributes.
|
these attributes.
|
||||||
|
|
|
@ -1215,6 +1215,11 @@ class Mock(CallableMixin, NonCallableMock):
|
||||||
this is a new Mock (created on first access). See the
|
this is a new Mock (created on first access). See the
|
||||||
`return_value` attribute.
|
`return_value` attribute.
|
||||||
|
|
||||||
|
* `unsafe`: By default, accessing any attribute whose name starts with
|
||||||
|
*assert*, *assret*, *asert*, *aseert* or *assrt* will raise an
|
||||||
|
AttributeError. Passing `unsafe=True` will allow access to
|
||||||
|
these attributes.
|
||||||
|
|
||||||
* `wraps`: Item for the mock object to wrap. If `wraps` is not None then
|
* `wraps`: Item for the mock object to wrap. If `wraps` is not None then
|
||||||
calling the Mock will pass the call through to the wrapped object
|
calling the Mock will pass the call through to the wrapped object
|
||||||
(returning the real result). Attribute access on the mock will return a
|
(returning the real result). Attribute access on the mock will return a
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue