mirror of
https://github.com/python/cpython.git
synced 2026-01-04 14:32:21 +00:00
gh-130106: Fix a typo in unittest.mock doc (#130107)
This commit is contained in:
parent
39cd9728a6
commit
d2e60d8e59
1 changed files with 1 additions and 1 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue