Skip to content

Commit

Permalink
Use mock.patch.dict to patch os.environ
Browse files Browse the repository at this point in the history
  • Loading branch information
isuruf committed Dec 23, 2021
1 parent 975a6f1 commit 43f1475
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion distutils/_msvccompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ def _fallback_spawn(self, cmd, env):
return
warnings.warn(
"Fallback spawn triggered. Please update distutils monkeypatch.")
with unittest.mock.patch('os.environ', env):
with unittest.mock.patch.dict('os.environ', env):
bag.value = super().spawn(cmd)

# -- Miscellaneous methods -----------------------------------------
Expand Down

0 comments on commit 43f1475

Please sign in to comment.