Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
8aa5a581
Kaydet (Commit)
8aa5a581
authored
Mar 25, 2010
tarafından
Florent Xicluna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#8207: Fix test_pep277 on OS X
üst
c8a730bf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
11 deletions
+20
-11
test_pep277.py
Lib/test/test_pep277.py
+18
-9
NEWS
Misc/NEWS
+2
-2
No files found.
Lib/test/test_pep277.py
Dosyayı görüntüle @
8aa5a581
...
@@ -15,11 +15,6 @@ filenames = [
...
@@ -15,11 +15,6 @@ filenames = [
u'
\u66e8\u66e9\u66eb
'
,
u'
\u66e8\u66e9\u66eb
'
,
u'
\u66e8\u05e9\u3093\u0434\u0393\xdf
'
,
u'
\u66e8\u05e9\u3093\u0434\u0393\xdf
'
,
# Specific code points: fn, NFC(fn) and NFKC(fn) all differents
# Specific code points: fn, NFC(fn) and NFKC(fn) all differents
u'
\u2000\u2000\u2000
A'
,
u'
\u2001\u2001\u2001
A'
,
u'
\u2003\u2003\u2003
A'
,
# == NFC(u'\u2001\u2001\u2001A')
u'
\u0020\u0020\u0020
A'
,
# u'\u0020' == u' ' == NFKC(u'\u2000')
# u'\u0020' == NFKC(u'\u2001') == NFKC(u'\u2003')
u'
\u1fee\u1ffd
'
,
u'
\u1fee\u1ffd
'
,
# Specific code points: NFC(fn), NFD(fn), NFKC(fn) and NFKD(fn) all differents
# Specific code points: NFC(fn), NFD(fn), NFKC(fn) and NFKD(fn) all differents
u'
\u0385\u03d3\u03d4
'
,
u'
\u0385\u03d3\u03d4
'
,
...
@@ -28,6 +23,22 @@ filenames = [
...
@@ -28,6 +23,22 @@ filenames = [
u'
\u1e9b\u1fc1\u1fcd\u1fce\u1fcf\u1fdd\u1fde\u1fdf\u1fed
'
,
u'
\u1e9b\u1fc1\u1fcd\u1fce\u1fcf\u1fdd\u1fde\u1fdf\u1fed
'
,
]
]
# Mac OS X decomposes Unicode names, using Normal Form D.
# http://developer.apple.com/mac/library/qa/qa2001/qa1173.html
# "However, most volume formats do not follow the exact specification for
# these normal forms. For example, HFS Plus uses a variant of Normal Form D
# in which U+2000 through U+2FFF, U+F900 through U+FAFF, and U+2F800 through
# U+2FAFF are not decomposed."
if
sys
.
platform
!=
'darwin'
:
filenames
.
extend
([
# Specific code points: fn, NFC(fn) and NFKC(fn) all differents
u'
\u1fee\u1ffd\ufad1
'
,
u'
\u2000\u2000\u2000
A'
,
u'
\u2001\u2001\u2001
A'
,
u'
\u2003\u2003\u2003
A'
,
# == NFC(u'\u2001\u2001\u2001A')
u'
\u0020\u0020\u0020
A'
,
# u'\u0020' == u' ' == NFKC(u'\u2000') ==
# NFKC(u'\u2001') == NFKC(u'\u2003')
])
# Destroy directory dirname and all files under it, to one level.
# Destroy directory dirname and all files under it, to one level.
def
deltree
(
dirname
):
def
deltree
(
dirname
):
...
@@ -114,8 +125,7 @@ class UnicodeFileTests(unittest.TestCase):
...
@@ -114,8 +125,7 @@ class UnicodeFileTests(unittest.TestCase):
files
=
set
(
normalize
(
'NFD'
,
file
)
for
file
in
files
)
files
=
set
(
normalize
(
'NFD'
,
file
)
for
file
in
files
)
for
name
in
others
:
for
name
in
others
:
if
sys
.
platform
==
'darwin'
and
normalize
(
'NFD'
,
name
)
in
files
:
if
sys
.
platform
==
'darwin'
and
normalize
(
'NFD'
,
name
)
in
files
:
# Mac OS X decomposes Unicode names, using Normal Form D.
# Mac OS X decomposes Unicode names. See comment above.
# http://developer.apple.com/mac/library/qa/qa2001/qa1173.html
os
.
stat
(
name
)
os
.
stat
(
name
)
continue
continue
self
.
_apply_failure
(
open
,
name
,
IOError
)
self
.
_apply_failure
(
open
,
name
,
IOError
)
...
@@ -132,8 +142,7 @@ class UnicodeFileTests(unittest.TestCase):
...
@@ -132,8 +142,7 @@ class UnicodeFileTests(unittest.TestCase):
f2
=
os
.
listdir
(
unicode
(
test_support
.
TESTFN
,
f2
=
os
.
listdir
(
unicode
(
test_support
.
TESTFN
,
sys
.
getfilesystemencoding
()))
sys
.
getfilesystemencoding
()))
if
sys
.
platform
==
'darwin'
:
if
sys
.
platform
==
'darwin'
:
# Mac OS X returns canonically decomposed Unicode (Normal Form D)
# Mac OS X decomposes Unicode names. See comment above.
# http://developer.apple.com/mac/library/qa/qa2001/qa1173.html
sf0
=
set
(
normalize
(
'NFD'
,
unicode
(
f
))
for
f
in
self
.
files
)
sf0
=
set
(
normalize
(
'NFD'
,
unicode
(
f
))
for
f
in
self
.
files
)
f2
=
[
normalize
(
'NFD'
,
unicode
(
f
))
for
f
in
f2
]
f2
=
[
normalize
(
'NFD'
,
unicode
(
f
))
for
f
in
f2
]
sf2
=
set
(
os
.
path
.
join
(
unicode
(
test_support
.
TESTFN
),
f
)
for
f
in
f2
)
sf2
=
set
(
os
.
path
.
join
(
unicode
(
test_support
.
TESTFN
),
f
)
for
f
in
f2
)
...
...
Misc/NEWS
Dosyayı görüntüle @
8aa5a581
...
@@ -147,8 +147,8 @@ C-API
...
@@ -147,8 +147,8 @@ C-API
Tests
Tests
-----
-----
- Issue #8180
: Fix test_pep277 on OS X and add more tests for special Unicode
- Issue #8180
and #8207: Fix test_pep277 on OS X and add more tests for special
normalization cases.
Unicode
normalization cases.
- Issue #7783: test.test_support.open_urlresource invalidates the outdated
- Issue #7783: test.test_support.open_urlresource invalidates the outdated
files from the local cache.
files from the local cache.
...
...
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