python3.12/00304-test-posix-pass-envir...

14 lines
588 B
Diff

diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py
index da0135b..1b27b5f 100644
--- a/Lib/test/test_posix.py
+++ b/Lib/test/test_posix.py
@@ -1463,7 +1463,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')