Skip to content

Commit

Permalink
[3.12] pythongh-130106: Fix a typo in unittest.mock doc (pythonGH-130107
Browse files Browse the repository at this point in the history
) (python#130144)

pythongh-130106: Fix a typo in unittest.mock doc (pythonGH-130107)
(cherry picked from commit d2e60d8)

Co-authored-by: Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్  రెడ్డి) <thatiparthysreenivas@gmail.com>
  • Loading branch information
miss-islington and srinivasreddy authored Feb 15, 2025
1 parent a122415 commit f23ed0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Doc/library/unittest.mock.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit f23ed0c

Please sign in to comment.