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
181e20a6
Kaydet (Commit)
181e20a6
authored
Ara 02, 2012
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
merge 3.3
üst
661c346a
a2816c2b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
multibytecodec_support.py
Lib/test/multibytecodec_support.py
+7
-0
test_multibytecodec.py
Lib/test/test_multibytecodec.py
+0
-4
No files found.
Lib/test/multibytecodec_support.py
Dosyayı görüntüle @
181e20a6
...
...
@@ -108,6 +108,13 @@ class TestBase:
self
.
assertEqual
(
self
.
encode
(
sin
,
"test.xmlcharnamereplace"
)[
0
],
sout
)
def
test_callback_returns_bytes
(
self
):
def
myreplace
(
exc
):
return
(
b
"1234"
,
exc
.
end
)
codecs
.
register_error
(
"test.cjktest"
,
myreplace
)
enc
=
self
.
encode
(
"abc"
+
self
.
unmappedunicode
+
"def"
,
"test.cjktest"
)[
0
]
self
.
assertEqual
(
enc
,
b
"abc1234def"
)
def
test_callback_wrong_objects
(
self
):
def
myreplace
(
exc
):
return
(
ret
,
exc
.
end
)
...
...
Lib/test/test_multibytecodec.py
Dosyayı görüntüle @
181e20a6
...
...
@@ -45,10 +45,6 @@ class Test_MultibyteCodec(unittest.TestCase):
self
.
assertRaises
(
IndexError
,
dec
,
b
'apple
\x92
ham
\x93
spam'
,
'test.cjktest'
)
def
test_errorhandler_returns_bytes
(
self
):
enc
=
"
\u30fb\udc80
"
.
encode
(
'gb18030'
,
'surrogateescape'
)
self
.
assertEqual
(
enc
,
b
'
\x81
9
\xa7
9
\x80
'
)
def
test_codingspec
(
self
):
try
:
for
enc
in
ALL_CJKENCODINGS
:
...
...
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