@@ -116,28 +116,15 @@ def get_expected_details(cls, coercion_expected, fs_encoding, stream_encoding, e
116
116
stream_info = 2 * [_stream .format ("surrogateescape" )]
117
117
# stderr should always use backslashreplace
118
118
stream_info .append (_stream .format ("backslashreplace" ))
119
- expected_lang = env_vars .get ("LANG" , "not set" ). lower ()
119
+ expected_lang = env_vars .get ("LANG" , "not set" )
120
120
if coercion_expected :
121
- expected_lc_ctype = CLI_COERCION_TARGET . lower ()
121
+ expected_lc_ctype = CLI_COERCION_TARGET
122
122
else :
123
- expected_lc_ctype = env_vars .get ("LC_CTYPE" , "not set" ). lower ()
124
- expected_lc_all = env_vars .get ("LC_ALL" , "not set" ). lower ()
123
+ expected_lc_ctype = env_vars .get ("LC_CTYPE" , "not set" )
124
+ expected_lc_all = env_vars .get ("LC_ALL" , "not set" )
125
125
env_info = expected_lang , expected_lc_ctype , expected_lc_all
126
126
return dict (cls (fs_encoding , * stream_info , * env_info )._asdict ())
127
127
128
- @staticmethod
129
- def _handle_output_variations (data ):
130
- """Adjust the output to handle platform specific idiosyncrasies
131
-
132
- * Some platforms report ASCII as ANSI_X3.4-1968
133
- * Some platforms report ASCII as US-ASCII
134
- * Some platforms report UTF-8 instead of utf-8
135
- """
136
- data = data .replace (b"ANSI_X3.4-1968" , b"ascii" )
137
- data = data .replace (b"US-ASCII" , b"ascii" )
138
- data = data .lower ()
139
- return data
140
-
141
128
@classmethod
142
129
def get_child_details (cls , env_vars ):
143
130
"""Retrieves fsencoding and standard stream details from a child process
@@ -157,8 +144,7 @@ def get_child_details(cls, env_vars):
157
144
if not result .rc == 0 :
158
145
result .fail (py_cmd )
159
146
# All subprocess outputs in this test case should be pure ASCII
160
- adjusted_output = cls ._handle_output_variations (result .out )
161
- stdout_lines = adjusted_output .decode ("ascii" ).splitlines ()
147
+ stdout_lines = result .out .decode ("ascii" ).splitlines ()
162
148
child_encoding_details = dict (cls (* stdout_lines )._asdict ())
163
149
stderr_lines = result .err .decode ("ascii" ).rstrip ().splitlines ()
164
150
return child_encoding_details , stderr_lines
0 commit comments