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
41118045
Kaydet (Commit)
41118045
authored
Eki 21, 2002
tarafından
Barry Warsaw
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
test_body_encoding(): a new test for Charset.body_encode(), especially
one that tests the obscure bug reported in SF # 625509.
üst
34aa4453
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
test_email.py
Lib/email/test/test_email.py
+14
-0
No files found.
Lib/email/test/test_email.py
Dosyayı görüntüle @
41118045
...
...
@@ -2080,6 +2080,13 @@ two line""")
# Test the Charset class
class
TestCharset
(
unittest
.
TestCase
):
def
tearDown
(
self
):
from
email
import
Charset
as
CharsetModule
try
:
del
CharsetModule
.
CHARSETS
[
'fake'
]
except
KeyError
:
pass
def
test_idempotent
(
self
):
eq
=
self
.
assertEqual
# Make sure us-ascii = no Unicode conversion
...
...
@@ -2114,6 +2121,13 @@ class TestCharset(unittest.TestCase):
except
LookupError
:
# We probably don't have the Japanese codecs installed
pass
# Testing SF bug #625509, which we have to fake, since there are no
# built-in encodings where the header encoding is QP but the body
# encoding is not.
from
email
import
Charset
as
CharsetModule
CharsetModule
.
add_charset
(
'fake'
,
CharsetModule
.
QP
,
None
)
c
=
Charset
(
'fake'
)
eq
(
'hello w
\xf6
rld'
,
c
.
body_encode
(
'hello w
\xf6
rld'
))
...
...
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