summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-06-12 16:50:58 (GMT)
committerGitHub <noreply@github.com>2023-06-12 16:50:58 (GMT)
commit77bdeebdda3358186df6e6ba900c562ddaefaa5c (patch)
tree15dfc0b54a68a195c42c6e83cb0bf03b9af7e020 /Lib/test
parent2eed1f5868b1c54a5314b64c38010258d27658da (diff)
downloadcpython-77bdeebdda3358186df6e6ba900c562ddaefaa5c.zip
cpython-77bdeebdda3358186df6e6ba900c562ddaefaa5c.tar.gz
cpython-77bdeebdda3358186df6e6ba900c562ddaefaa5c.tar.bz2
[3.12] gh-105436: The environment block should end with two null wchar_t values (GH-105495) (#105700)
gh-105436: The environment block should end with two null wchar_t values (GH-105495) (cherry picked from commit 4f7d3b602d47d61137e82145f601dccfe6f6cd3c) Co-authored-by: Dora203 <66343334+sku2000@users.noreply.github.com>
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_subprocess.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index 51ba423..3d4fffb 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -1692,6 +1692,13 @@ class RunFuncTestCase(BaseTestCase):
res = subprocess.run(args)
self.assertEqual(res.returncode, 57)
+ @unittest.skipUnless(mswindows, "Maybe test trigger a leak on Ubuntu")
+ def test_run_with_an_empty_env(self):
+ # gh-105436: fix subprocess.run(..., env={}) broken on Windows
+ args = [sys.executable, "-c", 'import sys; sys.exit(57)']
+ res = subprocess.run(args, env={})
+ self.assertEqual(res.returncode, 57)
+
def test_capture_output(self):
cp = self.run_python(("import sys;"
"sys.stdout.write('BDFL'); "