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
e843e482
Commit
e843e482
authored
Jan 07, 2002
by
Mark Hammond
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure Unicode filenames work with glob - they already do, but the test seems worth keeping.
parent
6253a114
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
Lib/test/test_unicode_file.py
Lib/test/test_unicode_file.py
+9
-1
No files found.
Lib/test/test_unicode_file.py
View file @
e843e482
# Test some Unicode file name semantics
# We dont test many operations on files other than
# that their names can be used with Unicode characters.
import
os
import
os
,
glob
from
test_support
import
verify
,
TestSkipped
,
TESTFN_UNICODE
try
:
...
...
@@ -57,6 +57,14 @@ if not os.path.isfile(TESTFN_UNICODE) or \
path
,
base
=
os
.
path
.
split
(
os
.
path
.
abspath
(
TESTFN_ENCODED
))
if
base
not
in
os
.
listdir
(
path
):
print
"Filename did not appear in os.listdir()"
path
,
base
=
os
.
path
.
split
(
os
.
path
.
abspath
(
TESTFN_UNICODE
))
if
base
not
in
os
.
listdir
(
path
):
print
"Unicode filename did not appear in os.listdir()"
if
os
.
path
.
abspath
(
TESTFN_ENCODED
)
!=
os
.
path
.
abspath
(
glob
.
glob
(
TESTFN_ENCODED
)[
0
]):
print
"Filename did not appear in glob.glob()"
if
os
.
path
.
abspath
(
TESTFN_UNICODE
)
!=
os
.
path
.
abspath
(
glob
.
glob
(
TESTFN_UNICODE
)[
0
]):
print
"Unicode filename did not appear in glob.glob()"
f
.
close
()
os
.
unlink
(
TESTFN_UNICODE
)
...
...
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