]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #12383: skip test_empty_env() of subprocess on Windows
authorVictor Stinner <victor.stinner@haypocalc.com>
Wed, 22 Jun 2011 23:02:25 +0000 (01:02 +0200)
committerVictor Stinner <victor.stinner@haypocalc.com>
Wed, 22 Jun 2011 23:02:25 +0000 (01:02 +0200)
Cannot test an empty environment on Windows: Windows requires at least the
SYSTEMROOT environment variable to start Python.

Lib/test/test_subprocess.py

index 23325f49eebb5a40ec02a819efe1f12da3b6e045..4a563b98669d492cdb7e8965edb5d47cab7a7f29 100644 (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')