From: Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్ రెడ్డి) Date: Sat, 15 Feb 2025 03:30:12 +0000 (+0530) Subject: gh-130106: Fix a typo in unittest.mock doc (#130107) X-Git-Tag: v3.14.0a6~414 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d2e60d8e598b622573b68b80b4fbf98c021dd087;p=thirdparty%2FPython%2Fcpython.git gh-130106: Fix a typo in unittest.mock doc (#130107) --- diff --git a/Doc/library/unittest.mock.rst b/Doc/library/unittest.mock.rst index eae3ef2888ea..27c169dde727 100644 --- a/Doc/library/unittest.mock.rst +++ b/Doc/library/unittest.mock.rst @@ -2008,7 +2008,7 @@ Imagine we have a project that we want to test with the following structure:: Now we want to test ``some_function`` but we want to mock out ``SomeClass`` using :func:`patch`. The problem is that when we import module b, which we will have to -do then it imports ``SomeClass`` from module a. If we use :func:`patch` to mock out +do when it imports ``SomeClass`` from module a. If we use :func:`patch` to mock out ``a.SomeClass`` then it will have no effect on our test; module b already has a reference to the *real* ``SomeClass`` and it looks like our patching had no effect.