mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Remove AIX workaround test_subprocess (GH-8939)
An old apparent AIX behavior workaround in test_subprocess's test_undecodable_env is no longer needed.
This commit is contained in:
parent
a2eefa6754
commit
89d79b1449
2 changed files with 3 additions and 8 deletions
|
@ -2228,15 +2228,9 @@ class POSIXProcessTestCase(BaseTestCase):
|
||||||
env = os.environ.copy()
|
env = os.environ.copy()
|
||||||
env[key] = value
|
env[key] = value
|
||||||
# Use C locale to get ASCII for the locale encoding to force
|
# Use C locale to get ASCII for the locale encoding to force
|
||||||
# surrogate-escaping of \xFF in the child process; otherwise it can
|
# surrogate-escaping of \xFF in the child process
|
||||||
# be decoded as-is if the default locale is latin-1.
|
|
||||||
env['LC_ALL'] = 'C'
|
env['LC_ALL'] = 'C'
|
||||||
if sys.platform.startswith("aix"):
|
decoded_value = value
|
||||||
# On AIX, the C locale uses the Latin1 encoding
|
|
||||||
decoded_value = encoded_value.decode("latin1", "surrogateescape")
|
|
||||||
else:
|
|
||||||
# On other UNIXes, the C locale uses the ASCII encoding
|
|
||||||
decoded_value = value
|
|
||||||
stdout = subprocess.check_output(
|
stdout = subprocess.check_output(
|
||||||
[sys.executable, "-c", script],
|
[sys.executable, "-c", script],
|
||||||
env=env)
|
env=env)
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Remove special condition for AIX in `test_subprocess.test_undecodable_env`
|
Loading…
Add table
Add a link
Reference in a new issue