Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 62d5118

Browse files
author
Victor Stinner
committed
Issue #12383: skip test_empty_env() of subprocess on Windows
Cannot test an empty environment on Windows: Windows requires at least the SYSTEMROOT environment variable to start Python.
1 parent 237e5cb commit 62d5118

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Lib/test/test_subprocess.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,10 @@ def test_env(self):
339339
stdout, stderr = p.communicate()
340340
self.assertEqual(stdout, b"orange")
341341

342+
# Windows requires at least the SYSTEMROOT environment variable to start
343+
# Python
344+
@unittest.skipIf(sys.platform == 'win32',
345+
'cannot test an empty env on Windows')
342346
@unittest.skipIf(sysconfig.get_config_var('Py_ENABLE_SHARED') is not None,
343347
'the python library cannot be loaded '
344348
'with an empty environment')

0 commit comments

Comments
 (0)