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
a0241c85
Commit
a0241c85
authored
Aug 15, 2010
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix TESTFN_UNENCODABLE of test.support on Mac OS X
parent
4045575d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
Lib/test/support.py
Lib/test/support.py
+5
-6
No files found.
Lib/test/support.py
View file @
a0241c85
...
...
@@ -386,11 +386,10 @@ TESTFN_ENCODING = sys.getfilesystemencoding()
# TESTFN_UNENCODABLE is a filename (str type) that should *not* be able to be
# encoded by the filesystem encoding (in strict mode). It can be None if we
# cannot generate such filename.
TESTFN_UNENCODABLE
=
None
if
os
.
name
in
(
'nt'
,
'ce'
):
if
sys
.
getwindowsversion
().
platform
<
2
:
# win32s (0) or Windows 9x/ME (1)
TESTFN_UNENCODABLE
=
None
else
:
# skip win32s (0) or Windows 9x/ME (1)
if
sys
.
getwindowsversion
().
platform
>=
2
:
# Japanese characters (I think - from bug 846133)
TESTFN_UNENCODABLE
=
TESTFN
+
"-
\
u5171
\
u6709
\
u3055
\
u308c
\
u308b
"
try
:
...
...
@@ -402,8 +401,8 @@ if os.name in ('nt', 'ce'):
'Unicode filename tests may not be effective'
%
(
TESTFN_UNENCODABLE
,
TESTFN_ENCODING
))
TESTFN_UNENCODABLE
=
None
# Mac OS X denies unencodable filenames (invalid utf-8)
elif
sys
.
platform
!=
'darwin'
:
# Mac OS X denies unencodable filenames (invalid utf-8)
try
:
# ascii and utf-8 cannot encode the byte 0xff
b'
\
xff
'
.
decode
(
TESTFN_ENCODING
)
...
...
@@ -414,7 +413,7 @@ elif sys.platform != 'darwin':
else
:
# File system encoding (eg. ISO-8859-* encodings) can encode
# the byte 0xff. Skip some unicode filename tests.
TESTFN_UNENCODABLE
=
None
pass
# Save the initial cwd
SAVEDCWD
=
os
.
getcwd
()
...
...
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