diff options
author | Daniel Hahler <git@thequod.de> | 2019-05-24 17:49:14 +0200 |
---|---|---|
committer | Daniel Hahler <git@thequod.de> | 2019-05-30 17:39:44 +0200 |
commit | ace3a02cd485d1024a07d93dc8d58708a882587e (patch) | |
tree | 236ead87c166e09c380ffd14561ccaeb9b857710 /testing/test_pytester.py | |
parent | f013a5e8c1d375f2a5187fa2570627b8b05c45de (diff) | |
download | pytest-ace3a02cd485d1024a07d93dc8d58708a882587e.tar.gz |
pytester: factor out testdir._env_run_update
Diffstat (limited to 'testing/test_pytester.py')
-rw-r--r-- | testing/test_pytester.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/testing/test_pytester.py b/testing/test_pytester.py index 4d3833ba0..54d364ca1 100644 --- a/testing/test_pytester.py +++ b/testing/test_pytester.py @@ -569,12 +569,15 @@ def test_spawn_uses_tmphome(testdir): # Does use HOME only during run. assert os.environ.get("HOME") != tmphome + testdir._env_run_update["CUSTOMENV"] = "42" + p1 = testdir.makepyfile( """ import os def test(): assert os.environ["HOME"] == {tmphome!r} + assert os.environ["CUSTOMENV"] == "42" """.format( tmphome=tmphome ) |