https://github.com/python/cpython/commit/f23ed0c9852b55af30a24b01238c197ef33864e2 commit: f23ed0c9852b55af30a24b01238c197ef33864e2 branch: 3.12 author: Miss Islington (bot) <31488909+miss-isling...@users.noreply.github.com> committer: terryjreedy <tjre...@udel.edu> date: 2025-02-15T03:59:08Z summary:
[3.12] gh-130106: Fix a typo in unittest.mock doc (GH-130107) (#130144) gh-130106: Fix a typo in unittest.mock doc (GH-130107) (cherry picked from commit d2e60d8e598b622573b68b80b4fbf98c021dd087) Co-authored-by: Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్ రెడ్డి) <thatiparthysreeni...@gmail.com> files: M Doc/library/unittest.mock.rst diff --git a/Doc/library/unittest.mock.rst b/Doc/library/unittest.mock.rst index 84f34a0696a26c..b44b8dc2d20a57 100644 --- a/Doc/library/unittest.mock.rst +++ b/Doc/library/unittest.mock.rst @@ -1958,7 +1958,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. _______________________________________________ Python-checkins mailing list -- python-checkins@python.org To unsubscribe send an email to python-checkins-le...@python.org https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: arch...@mail-archive.com