[Python-checkins] r85466 - python/branches/py3k/Lib/test/test_subprocess.py

victor.stinner python-checkins at python.org
Thu Oct 14 12:38:19 CEST 2010


Author: victor.stinner
Date: Thu Oct 14 12:38:17 2010
New Revision: 85466

Log:
test_subprocess: use C locale to get ascii locale encoding


Modified:
   python/branches/py3k/Lib/test/test_subprocess.py

Modified: python/branches/py3k/Lib/test/test_subprocess.py
==============================================================================
--- python/branches/py3k/Lib/test/test_subprocess.py	(original)
+++ python/branches/py3k/Lib/test/test_subprocess.py	Thu Oct 14 12:38:17 2010
@@ -885,6 +885,8 @@
             script = "import os; print(ascii(os.getenv(%s)))" % repr(key)
             env = os.environ.copy()
             env[key] = value
+            # Use C locale to get ascii for the locale encoding
+            env['LC_ALL'] = 'C'
             stdout = subprocess.check_output(
                 [sys.executable, "-c", script],
                 env=env)
@@ -897,6 +899,8 @@
             script = "import os; print(ascii(os.getenvb(%s)))" % repr(key)
             env = os.environ.copy()
             env[key] = value
+            # Use C locale to get ascii for the locale encoding
+            env['LC_ALL'] = 'C'
             stdout = subprocess.check_output(
                 [sys.executable, "-c", script],
                 env=env)


More information about the Python-checkins mailing list