Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1512a2 commit 372309aCopy full SHA for 372309a
1 file changed
Lib/test/test_subprocess.py
@@ -339,14 +339,17 @@ def test_env(self):
339
stdout, stderr = p.communicate()
340
self.assertEqual(stdout, b"orange")
341
342
+ @unittest.skipIf(sysconfig.get_config_var('Py_ENABLE_SHARED') == 1,
343
+ 'the python library cannot be loaded '
344
+ 'with an empty environment')
345
def test_empty_env(self):
346
with subprocess.Popen([sys.executable, "-c",
347
'import os; '
- 'print(len(os.environ))'],
348
+ 'print(list(os.environ.keys()))'],
349
stdout=subprocess.PIPE,
350
env={}) as p:
351
- self.assertEqual(stdout.strip(), b"0")
352
+ self.assertEqual(stdout.strip(), b"[]")
353
354
def test_communicate_stdin(self):
355
p = subprocess.Popen([sys.executable, "-c",
0 commit comments