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
be8c2b1c
Kaydet (Commit)
be8c2b1c
authored
Şub 27, 2010
tarafından
Florent Xicluna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#7793: Fix RuntimeError when running "regrtest -R" for multibyte codecs.
üst
37212ed4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
18 deletions
+3
-18
test_multibytecodec_support.py
Lib/test/test_multibytecodec_support.py
+3
-18
No files found.
Lib/test/test_multibytecodec_support.py
Dosyayı görüntüle @
be8c2b1c
...
...
@@ -244,22 +244,6 @@ class TestBase:
self
.
assertEqual
(
ostream
.
getvalue
(),
self
.
tstring
[
0
])
if
len
(
u'
\U00012345
'
)
==
2
:
# ucs2 build
_unichr
=
unichr
def
unichr
(
v
):
if
v
>=
0x10000
:
return
_unichr
(
0xd800
+
((
v
-
0x10000
)
>>
10
))
+
\
_unichr
(
0xdc00
+
((
v
-
0x10000
)
&
0x3ff
))
else
:
return
_unichr
(
v
)
_ord
=
ord
def
ord
(
c
):
if
len
(
c
)
==
2
:
return
0x10000
+
((
_ord
(
c
[
0
])
-
0xd800
)
<<
10
)
+
\
(
ord
(
c
[
1
])
-
0xdc00
)
else
:
return
_ord
(
c
)
class
TestBase_Mapping
(
unittest
.
TestCase
):
pass_enctest
=
[]
pass_dectest
=
[]
...
...
@@ -282,7 +266,8 @@ class TestBase_Mapping(unittest.TestCase):
self
.
_test_mapping_file_plain
()
def
_test_mapping_file_plain
(
self
):
unichrs
=
lambda
s
:
u''
.
join
(
map
(
unichr
,
map
(
eval
,
s
.
split
(
'+'
))))
_unichr
=
lambda
c
:
eval
(
"u'
\\
U
%08
x'"
%
int
(
c
,
16
))
unichrs
=
lambda
s
:
u''
.
join
(
_unichr
(
c
)
for
c
in
s
.
split
(
'+'
))
urt_wa
=
{}
for
line
in
self
.
open_mapping_file
():
...
...
@@ -307,7 +292,7 @@ class TestBase_Mapping(unittest.TestCase):
continue
unich
=
unichrs
(
data
[
1
])
if
ord
(
unich
)
==
0xfffd
or
unich
in
urt_wa
:
if
unich
==
u'
\ufffd
'
or
unich
in
urt_wa
:
continue
urt_wa
[
unich
]
=
csetch
...
...
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