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
45bb87bc
Commit
45bb87bc
authored
Oct 07, 2002
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use escaped Unicode literals, according to PEP 8.
parent
1d475d34
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
12 deletions
+11
-12
Lib/test/test_pep277.py
Lib/test/test_pep277.py
+11
-12
No files found.
Lib/test/test_pep277.py
View file @
45bb87bc
# -*- coding: utf-8 -*-
# Test the Unicode versions of normal file functions
# open, os.open, os.stat. os.listdir, os.rename, os.remove, os.mkdir, os.chdir, os.rmdir
import
os
,
unittest
...
...
@@ -9,15 +8,15 @@ except ImportError:
raise
TestSkipped
,
"test works only on NT+"
filenames
=
[
"abc"
,
u
nicode
(
"ascii"
,
"utf-8"
)
,
u
nicode
(
"Grüß-Gott"
,
"utf-8"
)
,
u
nicode
(
"Γειά-σας"
,
"utf-8"
)
,
u
nicode
(
"Здравствуйте"
,
"utf-8"
)
,
u
nicode
(
"にぽん"
,
"utf-8"
)
,
u
nicode
(
"השקצץס"
,
"utf-8"
)
,
u
nicode
(
"曨曩曫"
,
"utf-8"
)
,
u
nicode
(
"曨שんдΓß"
,
"utf-8"
)
,
'abc'
,
u
'ascii'
,
u
'Gr
\
xfc
\
xdf
-Gott'
,
u
'
\
u0393
\
u03b5
\
u03b9
\
u03ac
-
\
u03c3
\
u03b1
\
u03c2
'
,
u
'
\
u0417
\
u0434
\
u0440
\
u0430
\
u0432
\
u0441
\
u0442
\
u0432
\
u0443
\
u0439
\
u0442
\
u0435
'
,
u
'
\
u306b
\
u307d
\
u3093
'
,
u
'
\
u05d4
\
u05e9
\
u05e7
\
u05e6
\
u05e5
\
u05e1
'
,
u
'
\
u66e8
\
u66e9
\
u66eb
'
,
u
'
\
u66e8
\
u05e9
\
u3093
\
u0434
\
u0393
\
xdf
'
,
]
# Destroy directory dirname and all files under it, to one level.
...
...
@@ -92,8 +91,8 @@ class UnicodeFileTests(unittest.TestCase):
os
.
rename
(
"tmp"
,
name
)
def
test_directory
(
self
):
dirname
=
unicode
(
os
.
path
.
join
(
TESTFN
,
"Grüß-曨曩曫"
),
"utf-8"
)
filename
=
u
nicode
(
"ß-曨曩曫"
,
"utf-8"
)
dirname
=
os
.
path
.
join
(
TESTFN
,
u'Gr
\
xfc
\
xdf
-
\
u66e8
\
u66e9
\
u66eb
'
)
filename
=
u
'
\
xdf
-
\
u66e8
\
u66e9
\
u66eb
'
oldwd
=
os
.
getcwd
()
os
.
mkdir
(
dirname
)
os
.
chdir
(
dirname
)
...
...
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