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
db03e6b8
Commit
db03e6b8
authored
May 08, 2013
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #17656: Skip test_extract_unicode_filenames if the FS encoding
doesn't support non-ASCII filenames.
parent
5f4ba6b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
Lib/test/test_zipfile.py
Lib/test/test_zipfile.py
+9
-1
No files found.
Lib/test/test_zipfile.py
View file @
db03e6b8
...
...
@@ -18,7 +18,14 @@ from tempfile import TemporaryFile
from
random
import
randint
,
random
from
unittest
import
skipUnless
from
test.test_support
import
TESTFN
,
TESTFN_UNICODE
,
run_unittest
,
findfile
,
unlink
from
test.test_support
import
TESTFN
,
TESTFN_UNICODE
,
TESTFN_ENCODING
,
\
run_unittest
,
findfile
,
unlink
try
:
TESTFN_UNICODE
.
encode
(
TESTFN_ENCODING
)
except
(
UnicodeError
,
TypeError
):
# Either the file system encoding is None, or the file name
# cannot be encoded in the file system encoding.
TESTFN_UNICODE
=
None
TESTFN2
=
TESTFN
+
"2"
TESTFNDIR
=
TESTFN
+
"d"
...
...
@@ -424,6 +431,7 @@ class TestsWithSourceFile(unittest.TestCase):
with
open
(
filename
,
'rb'
)
as
f
:
self
.
assertEqual
(
f
.
read
(),
content
)
@
skipUnless
(
TESTFN_UNICODE
,
"No Unicode filesystem semantics on this platform."
)
def
test_extract_unicode_filenames
(
self
):
fnames
=
[
u'foo.txt'
,
os
.
path
.
basename
(
TESTFN_UNICODE
)]
content
=
'Test for unicode filename'
...
...
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