summaryrefslogtreecommitdiffstats
path: root/Doc/library/unittest.mock.rst
diff options
context:
space:
mode:
authorvabr-g <vabr@google.com>2020-12-10 18:35:28 (GMT)
committerGitHub <noreply@github.com>2020-12-10 18:35:28 (GMT)
commit9fc571359af9320fddbe4aa2710a767f168c1707 (patch)
tree62ac7bab3185ac676c211eb4d5b530c65f46e052 /Doc/library/unittest.mock.rst
parentb5c7b38f5ebbc84b5b80192db1743d3e1cdcf4c5 (diff)
downloadcpython-9fc571359af9320fddbe4aa2710a767f168c1707.zip
cpython-9fc571359af9320fddbe4aa2710a767f168c1707.tar.gz
cpython-9fc571359af9320fddbe4aa2710a767f168c1707.tar.bz2
bpo-41877: Improve docs for assert misspellings check in mock (GH-23729)
This is a follow-up to https://github.com/python/cpython/commit/4662fa9bfe4a849fe87bfb321d8ef0956c89a772. That original commit expanded guards against misspelling assertions on mocks. This follow-up updates the documentation and improves the error message by pointing out the potential cause and solution. Automerge-Triggered-By: GH:gpshead
Diffstat (limited to 'Doc/library/unittest.mock.rst')
-rw-r--r--Doc/library/unittest.mock.rst7
1 files changed, 4 insertions, 3 deletions
diff --git a/Doc/library/unittest.mock.rst b/Doc/library/unittest.mock.rst
index c5360f9..f795a2e 100644
--- a/Doc/library/unittest.mock.rst
+++ b/Doc/library/unittest.mock.rst
@@ -262,9 +262,10 @@ the *new_callable* argument to :func:`patch`.
this is a new Mock (created on first access). See the
:attr:`return_value` attribute.
- * *unsafe*: By default if any attribute starts with *assert* or
- *assret* will raise an :exc:`AttributeError`. Passing ``unsafe=True``
- will allow access to these attributes.
+ * *unsafe*: By default, accessing any attribute with name starting with
+ *assert*, *assret*, *asert*, *aseert* or *assrt* will raise an
+ :exc:`AttributeError`. Passing ``unsafe=True`` will allow access to
+ these attributes.
.. versionadded:: 3.5