Kaydet (Commit) 8153b7a5 authored tarafından Victor Stinner's avatar Victor Stinner

(merge 3.2) 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.
...@@ -390,6 +390,10 @@ class ProcessTestCase(BaseTestCase): ...@@ -390,6 +390,10 @@ class ProcessTestCase(BaseTestCase):
stdout, stderr = p.communicate() stdout, stderr = p.communicate()
self.assertEqual(stdout, b"orange") 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, @unittest.skipIf(sysconfig.get_config_var('Py_ENABLE_SHARED') is not None,
'the python library cannot be loaded ' 'the python library cannot be loaded '
'with an empty environment') 'with an empty environment')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment