Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
29a4cbff
Commit
29a4cbff
authored
Dec 06, 2018
by
native-api
Committed by
Serhiy Storchaka
Dec 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[2.7] bpo-33709: test_ntpath and test_posixpath fail in Windows with ACP!=1252. (GH-7278) (GH-7279)
parent
46aa472a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
Lib/test/support/__init__.py
Lib/test/support/__init__.py
+6
-2
Lib/test/test_posixpath.py
Lib/test/test_posixpath.py
+2
-4
No files found.
Lib/test/support/__init__.py
View file @
29a4cbff
...
...
@@ -657,8 +657,12 @@ if have_unicode:
unichr
(
0x20AC
),
):
try
:
character
.
encode
(
sys
.
getfilesystemencoding
())
\
.
decode
(
sys
.
getfilesystemencoding
())
# In Windows, 'mbcs' is used, and encode() returns '?'
# for characters missing in the ANSI codepage
if
character
.
encode
(
sys
.
getfilesystemencoding
())
\
.
decode
(
sys
.
getfilesystemencoding
())
\
!=
character
:
raise
UnicodeError
except
UnicodeError
:
pass
else
:
...
...
Lib/test/test_posixpath.py
View file @
29a4cbff
...
...
@@ -496,12 +496,10 @@ class PosixPathTest(unittest.TestCase):
finally
:
os
.
getcwd
=
real_getcwd
@
test_support
.
requires_unicode
@
unittest
.
skipUnless
(
test_support
.
FS_NONASCII
,
'need test_support.FS_NONASCII'
)
def
test_expandvars_nonascii_word
(
self
):
encoding
=
sys
.
getfilesystemencoding
()
# Non-ASCII word characters
letters
=
test_support
.
u
(
r'\xe6\u0130\u0141\u03c6\u041a\u05d0\u062a\u0e01'
)
uwnonascii
=
letters
.
encode
(
encoding
,
'ignore'
).
decode
(
encoding
)[:
3
]
uwnonascii
=
test_support
.
FS_NONASCII
swnonascii
=
uwnonascii
.
encode
(
encoding
)
if
not
swnonascii
:
self
.
skipTest
(
'Needs non-ASCII word characters'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment