mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
[3.11] gh-105436: The environment block should end with two null wchar_t values (GH-105495) (#105701)
gh-105436: The environment block should end with two null wchar_t values (GH-105495)
(cherry picked from commit 4f7d3b602d
)
Co-authored-by: Dora203 <66343334+sku2000@users.noreply.github.com>
This commit is contained in:
parent
f5b63eab9b
commit
261d0b4f0e
3 changed files with 22 additions and 1 deletions
|
@ -1690,6 +1690,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'); "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue