diff options
author | Miro HronĨok <miro@hroncok.cz> | 2018-05-11 07:40:43 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2018-05-11 08:40:43 +0300 |
commit | 7ec8f28656ea9d84048e9b5655375c6a74a59f53 (patch) | |
tree | 3278046b4177919761ea7c9ee16816e174613970 | |
parent | b551e9f0ff25018a5606465003e2c51c04f693a3 (diff) | |
download | cpython-git-7ec8f28656ea9d84048e9b5655375c6a74a59f53.tar.gz |
bpo-33455: Pass os.environ in test_posix::test_specify_environment. (GH-6753)
Pass os.environ's copy to new process created at test_posix:
test_specify_environment. Otherwise important variables such as
LD_LIBRARY_PATH are not set and the child process might not work at all
in an environment where such variables are required for Python to function.
-rw-r--r-- | Lib/test/test_posix.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py index b94da3f45a..ecf3e93eb0 100644 --- a/Lib/test/test_posix.py +++ b/Lib/test/test_posix.py @@ -1462,7 +1462,7 @@ class TestPosixSpawn(unittest.TestCase): """ pid = posix.posix_spawn(sys.executable, [sys.executable, '-c', script], - {'foo': 'bar'}) + {**os.environ, 'foo': 'bar'}) self.assertEqual(os.waitpid(pid, 0), (pid, 0)) with open(envfile) as f: self.assertEqual(f.read(), 'bar') |