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
2acb54a1
Kaydet (Commit)
2acb54a1
authored
Ock 19, 2001
tarafından
Fredrik Lundh
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
improved the ucnhash test a bit
üst
ee865c64
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
test_ucn
Lib/test/output/test_ucn
+3
-0
test_ucn.py
Lib/test/test_ucn.py
+8
-3
No files found.
Lib/test/output/test_ucn
Dosyayı görüntüle @
2acb54a1
test_ucn
Testing General Unicode Character Name, and case insensitivity... done.
Testing name to code mapping.... done.
Testing code to name mapping for all characters.... done.
Found 10538 characters in the unicode name database
Testing misc. symbols for unicode character name expansion.... done.
Testing unicode character name expansion strict error handling.... done.
Lib/test/test_ucn.py
Dosyayı görüntüle @
2acb54a1
...
...
@@ -37,25 +37,30 @@ s = u"\N{LATIN CAPITAL LETTER T}" \
u"
\N{LATIN SMALL LETTER P}
"
\
u"
\N{FULL STOP}
"
verify
(
s
==
u"The rEd fOx ate the sheep."
,
s
)
print
"done."
import
ucnhash
# minimal sanity check
print
"Testing name to code mapping...."
,
for
char
in
"SPAM"
:
name
=
"LATIN SMALL LETTER
%
s"
%
char
code
=
ucnhash
.
getcode
(
name
)
verify
(
ucnhash
.
getname
(
code
)
==
name
)
print
"done."
# loop over all characters in the database
print
"Testing code to name mapping for all characters...."
,
count
=
0
for
code
in
range
(
65536
):
try
:
name
=
ucnhash
.
getname
(
code
)
verify
(
ucnhash
.
getcode
(
name
)
==
code
)
count
+=
1
except
ValueError
:
pass
print
"done."
print
"Found"
,
count
,
"characters in the unicode name database"
# misc. symbol testing
print
"Testing misc. symbols for unicode character name expansion...."
,
verify
(
u"
\N{PILCROW SIGN}
"
==
u"
\u00b6
"
)
...
...
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