File tree Expand file tree Collapse file tree 2 files changed +2
-21
lines changed Expand file tree Collapse file tree 2 files changed +2
-21
lines changed Original file line number Diff line number Diff line change 19
19
import re
20
20
import shutil
21
21
import stat
22
- import sys
23
22
import time
24
23
import unicodedata
25
24
import unittest
@@ -423,19 +422,6 @@ def test_unicode_normalized_nfc_on_linux(self):
423
422
dest = self .i .destination (relative_to_libdir = True )
424
423
assert as_string (dest ) == unicodedata .normalize ("NFC" , instr )
425
424
426
- def test_non_mbcs_characters_on_windows (self ):
427
- oldfunc = sys .getfilesystemencoding
428
- sys .getfilesystemencoding = lambda : "mbcs"
429
- try :
430
- self .i .title = "h\u0259 d"
431
- self .lib .path_formats = [("default" , "$title" )]
432
- p = self .i .destination ()
433
- assert b"?" not in p
434
- # We use UTF-8 to encode Windows paths now.
435
- assert "h\u0259 d" .encode () in p
436
- finally :
437
- sys .getfilesystemencoding = oldfunc
438
-
439
425
def test_unicode_extension_in_fragment (self ):
440
426
self .lib .path_formats = [("default" , "foo" )]
441
427
self .i .path = util .bytestring_path ("bar.caf\xe9 " )
Original file line number Diff line number Diff line change @@ -156,13 +156,8 @@ def test_syspath_posix_unchanged(self):
156
156
assert path == outpath
157
157
158
158
def _windows_bytestring_path (self , path ):
159
- old_gfse = sys .getfilesystemencoding
160
- sys .getfilesystemencoding = lambda : "mbcs"
161
- try :
162
- with _common .platform_windows ():
163
- return util .bytestring_path (path )
164
- finally :
165
- sys .getfilesystemencoding = old_gfse
159
+ with _common .platform_windows ():
160
+ return util .bytestring_path (path )
166
161
167
162
def test_bytestring_path_windows_encodes_utf8 (self ):
168
163
path = "caf\xe9 "
You can’t perform that action at this time.
0 commit comments