Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34k
gh-144433: clarify patch.dict behavior#144434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
Update wording to indicate that unittest.mock patch.dict will make ashallow copy of the patched dict (opposed to a deep copy)
picnixz commentedFeb 3, 2026
Most of the time we use "copy" for "shallow" copy as opposed to "deep" copy which is usually mentioned. However, since this is the only occurrence of that in this page, I guess it's also fine. Can you check if there are other places in the unittest docs that require this improvement? (better do it in one go). Also can you also update the RST docs? it's much more important. |
Uh oh!
There was an error while loading.Please reload this page.
Update wording to indicate that unittest.mock patch.dict will make a shallow copy of the patched dict (opposed to a deep copy)