Commit 8759ca96 authored by Jason R. Coombs's avatar Jason R. Coombs

Add docstring

parent 813855aa
......@@ -61,6 +61,10 @@ class MockReg:
@contextlib.contextmanager
def patch_env(**replacements):
"""
In a context, patch the environment with replacements. Pass None values
to clear the values.
"""
saved = dict(
(key, os.environ['key'])
for key in replacements
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment