mirror of
https://github.com/python/cpython.git
synced 2026-01-30 22:55:41 +00:00
doc: fix a typo in unittest.mock.rst (GH-30227)
(cherry picked from commit 10bf0a9ac3c9bbde2fa8989d9435462f0e7da545) Co-authored-by: Joe <nigelchiang@outlook.com>
This commit is contained in:
parent
d968e422ef
commit
cfdb2302f4
@ -1516,7 +1516,7 @@ attribute in a class) that does not exist will fail with :exc:`AttributeError`::
|
||||
>>> test()
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
AttributeError: <module 'sys' (built-in)> does not have the attribute 'non_existing'
|
||||
AttributeError: <module 'sys' (built-in)> does not have the attribute 'non_existing_attribute'
|
||||
|
||||
but adding ``create=True`` in the call to :func:`patch` will make the previous example
|
||||
work as expected::
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user