From 299d49bbe3d3988e85f31c706be2f64e5fbace45 Mon Sep 17 00:00:00 2001 From: Michael Felt Date: Sun, 26 Aug 2018 13:16:05 +0000 Subject: [PATCH] Special handeling for AIX in test_subprocess.test_undecodable_env no longer needed --- Lib/test/test_subprocess.py | 10 ++-------- .../Tests/2018-08-26-13-12-34.bpo-11193.H8fCGa.rst | 1 + 2 files changed, 3 insertions(+), 8 deletions(-) create mode 100644 Misc/NEWS.d/next/Tests/2018-08-26-13-12-34.bpo-11193.H8fCGa.rst diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index 73b57b21db2cec..4719773b67b7d9 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -2228,15 +2228,9 @@ def test_undecodable_env(self): env = os.environ.copy() env[key] = value # Use C locale to get ASCII for the locale encoding to force - # surrogate-escaping of \xFF in the child process; otherwise it can - # be decoded as-is if the default locale is latin-1. + # surrogate-escaping of \xFF in the child process env['LC_ALL'] = 'C' - if sys.platform.startswith("aix"): - # 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 + decoded_value = value stdout = subprocess.check_output( [sys.executable, "-c", script], env=env) diff --git a/Misc/NEWS.d/next/Tests/2018-08-26-13-12-34.bpo-11193.H8fCGa.rst b/Misc/NEWS.d/next/Tests/2018-08-26-13-12-34.bpo-11193.H8fCGa.rst new file mode 100644 index 00000000000000..b31caa649520a5 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2018-08-26-13-12-34.bpo-11193.H8fCGa.rst @@ -0,0 +1 @@ +Remove special condition for AIX in `test_subprocess.test_undecodable_env`