]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Remove note saying patch is straightforward (#18431)
authorBrian Curtin <brian@python.org>
Mon, 10 Feb 2020 17:47:17 +0000 (10:47 -0700)
committerGitHub <noreply@github.com>
Mon, 10 Feb 2020 17:47:17 +0000 (10:47 -0700)
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.

Doc/library/unittest.mock.rst

index 515bdd060a198cd5e04d67940bc153c79bd51b6b..3643d1ad96ed11614291115cbbf7555098251b07 100644 (file)
@@ -1327,8 +1327,7 @@ patch
 
 .. note::
 
-    :func:`patch` is straightforward to use. The key is to do the patching in the
-    right namespace. See the section `where to patch`_.
+    The key is to do the patching in the right namespace. See the section `where to patch`_.
 
 .. function:: patch(target, new=DEFAULT, spec=None, create=False, spec_set=None, autospec=None, new_callable=None, **kwargs)