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.
This commit is contained in:
Victor Stinner 2011-06-23 01:02:25 +02:00
parent 237e5cb376
commit 62d511809d
1 changed files with 4 additions and 0 deletions

View File

@ -339,6 +339,10 @@ class ProcessTestCase(BaseTestCase):
stdout, stderr = p.communicate()
self.assertEqual(stdout, b"orange")
# Windows requires at least the SYSTEMROOT environment variable to start
# Python
@unittest.skipIf(sys.platform == 'win32',
'cannot test an empty env on Windows')
@unittest.skipIf(sysconfig.get_config_var('Py_ENABLE_SHARED') is not None,
'the python library cannot be loaded '
'with an empty environment')