Kaydet (Commit) 7ec8f286 authored tarafından Miro Hrončok's avatar Miro Hrončok Kaydeden (comit) Serhiy Storchaka

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.
üst b551e9f0
......@@ -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')
......
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