summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_subprocess.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-06-22 23:02:50 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-06-22 23:02:50 (GMT)
commit8153b7a57aeae8f40c09b729b8d6b5781d91aece (patch)
treeb16a963dc79337b3ef87adebddbfed4cbeb8b980 /Lib/test/test_subprocess.py
parent4527365ee4241246e437031b23dc62eb10b589e4 (diff)
parent62d511809d3ccde1b8555cf27f12f31f74c10da6 (diff)
downloadcpython-8153b7a57aeae8f40c09b729b8d6b5781d91aece.zip
cpython-8153b7a57aeae8f40c09b729b8d6b5781d91aece.tar.gz
cpython-8153b7a57aeae8f40c09b729b8d6b5781d91aece.tar.bz2
(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.
Diffstat (limited to 'Lib/test/test_subprocess.py')
-rw-r--r--Lib/test/test_subprocess.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index 00bd579..6e31fe7 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -390,6 +390,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')