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
7da4db11
Kaydet (Commit)
7da4db11
authored
Nis 08, 2011
tarafından
R David Murray
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Improve test coverage of _split_ascii method.
üst
88e19451
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
0 deletions
+43
-0
test_email.py
Lib/email/test/test_email.py
+43
-0
No files found.
Lib/email/test/test_email.py
Dosyayı görüntüle @
7da4db11
...
...
@@ -750,6 +750,49 @@ References: <0@dom.ain> <1@dom.ain> <2@dom.ain> <3@dom.ain> <4@dom.ain>
Test"""
)
def
test_last_split_chunk_does_not_fit
(
self
):
eq
=
self
.
ndiffAssertEqual
h
=
Header
(
'Subject: the first part of this is short, but_the_second'
'_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line'
'_all_by_itself'
)
eq
(
h
.
encode
(),
"""
\
Subject: the first part of this is short,
but_the_second_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itself"""
)
def
test_splittable_leading_char_followed_by_overlong_unsplitable
(
self
):
eq
=
self
.
ndiffAssertEqual
h
=
Header
(
', but_the_second'
'_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line'
'_all_by_itself'
)
eq
(
h
.
encode
(),
"""
\
,
but_the_second_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itself"""
)
def
test_multiple_splittable_leading_char_followed_by_overlong_unsplitable
(
self
):
eq
=
self
.
ndiffAssertEqual
h
=
Header
(
', , but_the_second'
'_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line'
'_all_by_itself'
)
eq
(
h
.
encode
(),
"""
\
, ,
but_the_second_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itself"""
)
def
test_trailing_splitable_on_overlong_unsplitable
(
self
):
eq
=
self
.
ndiffAssertEqual
h
=
Header
(
'this_part_does_not_fit_within_maxlinelen_and_thus_should_'
'be_on_a_line_all_by_itself;'
)
eq
(
h
.
encode
(),
"this_part_does_not_fit_within_maxlinelen_and_thus_should_"
"be_on_a_line_all_by_itself;"
)
def
test_trailing_splitable_on_overlong_unsplitable_with_leading_splitable
(
self
):
eq
=
self
.
ndiffAssertEqual
h
=
Header
(
'; '
'this_part_does_not_fit_within_maxlinelen_and_thus_should_'
'be_on_a_line_all_by_itself;'
)
eq
(
h
.
encode
(),
"""
\
;
this_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itself;"""
)
def
test_no_split_long_header
(
self
):
eq
=
self
.
ndiffAssertEqual
hstr
=
'References: '
+
'x'
*
80
...
...
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