Skip to content

Commit e00c1d0

Browse files
authored
Remove note saying patch is straightforward (#18431)
While `unittest.mock.patch` is a great thing, it is not straightforward. If it were straightforward there wouldn't be such a huge amount of documentation for it, and frankly, when myself and others who I've read about often struggle to figure out what on earth `patch()` wants, coming to the docs to read that it's straightforward is not helpful.
1 parent 29b3fc0 commit e00c1d0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Doc/library/unittest.mock.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,8 +1327,7 @@ patch
13271327

13281328
.. note::
13291329

1330-
:func:`patch` is straightforward to use. The key is to do the patching in the
1331-
right namespace. See the section `where to patch`_.
1330+
The key is to do the patching in the right namespace. See the section `where to patch`_.
13321331

13331332
.. function:: patch(target, new=DEFAULT, spec=None, create=False, spec_set=None, autospec=None, new_callable=None, **kwargs)
13341333

0 commit comments

Comments
 (0)