@@ -66,7 +66,6 @@ def test_xoption(self):
66
66
PYTHONLEGACYWINDOWSFSENCODING = '1' )
67
67
self .assertEqual (out , '0' )
68
68
69
- # TODO: RUSTPYTHON
70
69
@unittest .expectedFailure
71
70
def test_env_var (self ):
72
71
code = 'import sys; print(sys.flags.utf8_mode)'
@@ -159,8 +158,6 @@ def test_stdio(self):
159
158
'stdout: utf-8/namereplace' ,
160
159
'stderr: utf-8/backslashreplace' ])
161
160
162
- # TODO: RUSTPYTHON
163
- @unittest .expectedFailure
164
161
def test_io (self ):
165
162
code = textwrap .dedent ('''
166
163
import sys
@@ -171,7 +168,7 @@ def test_io(self):
171
168
filename = __file__
172
169
173
170
out = self .get_output ('-c' , code , filename , PYTHONUTF8 = '1' )
174
- self .assertEqual (out , 'UTF -8/strict' )
171
+ self .assertEqual (out , 'utf -8/strict' )
175
172
176
173
def _check_io_encoding (self , module , encoding = None , errors = None ):
177
174
filename = __file__
@@ -193,7 +190,7 @@ def _check_io_encoding(self, module, encoding=None, errors=None):
193
190
PYTHONUTF8 = '1' )
194
191
195
192
if not encoding :
196
- encoding = 'UTF -8'
193
+ encoding = 'utf -8'
197
194
if not errors :
198
195
errors = 'strict'
199
196
self .assertEqual (out , f'{ encoding } /{ errors } ' )
@@ -204,8 +201,6 @@ def check_io_encoding(self, module):
204
201
self ._check_io_encoding (module ,
205
202
encoding = "latin1" , errors = "namereplace" )
206
203
207
- # TODO: RUSTPYTHON
208
- @unittest .expectedFailure
209
204
def test_io_encoding (self ):
210
205
self .check_io_encoding ('io' )
211
206
@@ -215,12 +210,12 @@ def test_pyio_encoding(self):
215
210
def test_locale_getpreferredencoding (self ):
216
211
code = 'import locale; print(locale.getpreferredencoding(False), locale.getpreferredencoding(True))'
217
212
out = self .get_output ('-X' , 'utf8' , '-c' , code )
218
- self .assertEqual (out , 'UTF -8 UTF -8' )
213
+ self .assertEqual (out , 'utf -8 utf -8' )
219
214
220
215
for loc in POSIX_LOCALES :
221
216
with self .subTest (LC_ALL = loc ):
222
217
out = self .get_output ('-X' , 'utf8' , '-c' , code , LC_ALL = loc )
223
- self .assertEqual (out , 'UTF -8 UTF -8' )
218
+ self .assertEqual (out , 'utf -8 utf -8' )
224
219
225
220
@unittest .skipIf (MS_WINDOWS , 'test specific to Unix' )
226
221
def test_cmd_line (self ):
0 commit comments