# Documentation The docs for [`patch.dict`](https://docs.python.org/3/library/unittest.mock.html#unittest.mock.patch.dict) method is: `Patch a dictionary, or dictionary like object, and restore the dictionary to its original state after the test.` The phrase "to its original state" can be misleading, because this method actually restores a [_copy_ ](https://github.com/python/cpython/blob/671cb22094df5b645f65c383213bfda17c8003c5/Lib/unittest/mock.py#L1917)of the original data. I ran into strange behavior with my tests because of my assumption this method would restore the original values, not copies of them. Let me know if I'm misunderstanding anything :) Thanks all for your hard work! <!-- gh-linked-prs --> ### Linked PRs * gh-121755 <!-- /gh-linked-prs -->