diff options
author | Dominic H <dom@dominic.sk> | 2024-07-15 07:14:17 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-15 07:14:17 (GMT) |
commit | 8303d32ff55945c5b38eeeaf1b1811dbcf8aa9be (patch) | |
tree | 408086e9a2ec8274f33c1b2f59723bebb81dcd8f /Lib/unittest | |
parent | 48042c52a6b59089e7d7dda3c8fed79d646b6f8d (diff) | |
download | cpython-8303d32ff55945c5b38eeeaf1b1811dbcf8aa9be.zip cpython-8303d32ff55945c5b38eeeaf1b1811dbcf8aa9be.tar.gz cpython-8303d32ff55945c5b38eeeaf1b1811dbcf8aa9be.tar.bz2 |
gh-117765: Improve documentation for `mocker.patch.dict` (#121755)
Diffstat (limited to 'Lib/unittest')
-rw-r--r-- | Lib/unittest/mock.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/unittest/mock.py b/Lib/unittest/mock.py index d50535d..2bbbcf4 100644 --- a/Lib/unittest/mock.py +++ b/Lib/unittest/mock.py @@ -1829,7 +1829,8 @@ def patch( class _patch_dict(object): """ Patch a dictionary, or dictionary like object, and restore the dictionary - to its original state after the test. + to its original state after the test, where the restored dictionary is + a copy of the dictionary as it was before the test. `in_dict` can be a dictionary or a mapping like container. If it is a mapping then it must at least support getting, setting and deleting items |