diff options
author | Mario Corchero <mcorcherojim@bloomberg.net> | 2019-05-28 13:53:31 +0100 |
---|---|---|
committer | Cheryl Sabella <cheryl.sabella@gmail.com> | 2019-05-28 08:53:30 -0400 |
commit | 04530812e90e45a37ed84e83505d63db7edc1262 (patch) | |
tree | c26e4f6492e37209667b61943cb5a156c2f57aeb /Lib/unittest/mock.py | |
parent | eb65e2443ac21739baf6d373abc7b4638b9d6927 (diff) | |
download | cpython-git-04530812e90e45a37ed84e83505d63db7edc1262.tar.gz |
bpo-32299: Return patched dict when using patch.dict as a context manager (GH-11062)
Diffstat (limited to 'Lib/unittest/mock.py')
-rw-r--r-- | Lib/unittest/mock.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/unittest/mock.py b/Lib/unittest/mock.py index fac4535747..055fbb350c 100644 --- a/Lib/unittest/mock.py +++ b/Lib/unittest/mock.py @@ -1730,6 +1730,7 @@ class _patch_dict(object): def __enter__(self): """Patch the dict.""" self._patch_dict() + return self.in_dict def _patch_dict(self): |