diff options
author | Jack DeVries <58614260+jdevries3133@users.noreply.github.com> | 2021-07-05 06:52:32 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-05 06:52:32 (GMT) |
commit | abb08e3af6aa19928007a349592e95e6de38467f (patch) | |
tree | cc64ac66bee7a42538c6ead08c7705a3250c59b2 /Lib | |
parent | a9a69bb3ea1e6cf54513717212aaeae0d61b24ee (diff) | |
download | cpython-abb08e3af6aa19928007a349592e95e6de38467f.zip cpython-abb08e3af6aa19928007a349592e95e6de38467f.tar.gz cpython-abb08e3af6aa19928007a349592e95e6de38467f.tar.bz2 |
bpo-44534: fix wording and docstring sync in unittest.Mock GH27000
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/unittest/mock.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/unittest/mock.py b/Lib/unittest/mock.py index a4e571a..5be9120 100644 --- a/Lib/unittest/mock.py +++ b/Lib/unittest/mock.py @@ -1215,6 +1215,11 @@ class Mock(CallableMixin, NonCallableMock): this is a new Mock (created on first access). See the `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 calling the Mock will pass the call through to the wrapped object (returning the real result). Attribute access on the mock will return a |