mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-32299: Return patched dict when using patch.dict as a context manager (GH-11062)
This commit is contained in:
parent
eb65e2443a
commit
04530812e9
4 changed files with 20 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue