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
f73a48cb
Kaydet (Commit)
f73a48cb
authored
May 06, 2016
tarafından
Terry Jan Reedy
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue 26912: fix broken imports in test_email package.
üst
823c626b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
12 deletions
+9
-12
test_asian_codecs.py
Lib/test/test_email/test_asian_codecs.py
+3
-3
torture_test.py
Lib/test/test_email/torture_test.py
+6
-9
No files found.
Lib/test/test_email/test_asian_codecs.py
Dosyayı görüntüle @
f73a48cb
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
import
unittest
import
unittest
from
test.support
import
run_unittest
from
test.support
import
run_unittest
from
test.test_email
.test_email
import
TestEmailBase
from
test.test_email
import
TestEmailBase
from
email.charset
import
Charset
from
email.charset
import
Charset
from
email.header
import
Header
,
decode_header
from
email.header
import
Header
,
decode_header
from
email.message
import
Message
from
email.message
import
Message
...
@@ -18,7 +18,7 @@ except LookupError:
...
@@ -18,7 +18,7 @@ except LookupError:
raise
unittest
.
SkipTest
raise
unittest
.
SkipTest
class
TestEmailAsianCodecs
(
TestEmailBase
):
class
TestEmailAsianCodecs
(
TestEmailBase
):
def
test_japanese_codecs
(
self
):
def
test_japanese_codecs
(
self
):
eq
=
self
.
ndiffAssertEqual
eq
=
self
.
ndiffAssertEqual
...
@@ -77,6 +77,6 @@ Hello World! =?iso-2022-jp?b?GyRCJU8lbSE8JW8hPCVrJUkhKhsoQg==?=
...
@@ -77,6 +77,6 @@ Hello World! =?iso-2022-jp?b?GyRCJU8lbSE8JW8hPCVrJUkhKhsoQg==?=
self
.
assertEqual
(
jhello
,
ustr
)
self
.
assertEqual
(
jhello
,
ustr
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
unittest
.
main
()
unittest
.
main
()
Lib/test/test_email/torture_test.py
Dosyayı görüntüle @
f73a48cb
...
@@ -10,10 +10,9 @@ import sys
...
@@ -10,10 +10,9 @@ import sys
import
os
import
os
import
unittest
import
unittest
from
io
import
StringIO
from
io
import
StringIO
from
types
import
ListType
from
email.
test.test_email
import
TestEmailBase
from
test.test_email
import
TestEmailBase
from
test.support
import
TestSkipped
,
run_unittest
from
test.support
import
run_unittest
import
email
import
email
from
email
import
__file__
as
testfile
from
email
import
__file__
as
testfile
...
@@ -28,10 +27,10 @@ def openfile(filename):
...
@@ -28,10 +27,10 @@ def openfile(filename):
try
:
try
:
openfile
(
'crispin-torture.txt'
)
openfile
(
'crispin-torture.txt'
)
except
OSError
:
except
OSError
:
raise
TestSkipped
raise
unittest
.
SkipTest
class
TortureBase
(
TestEmailBase
):
class
TortureBase
(
TestEmailBase
):
def
_msgobj
(
self
,
filename
):
def
_msgobj
(
self
,
filename
):
fp
=
openfile
(
filename
)
fp
=
openfile
(
filename
)
...
@@ -42,7 +41,7 @@ class TortureBase(TestEmailBase):
...
@@ -42,7 +41,7 @@ class TortureBase(TestEmailBase):
return
msg
return
msg
class
TestCrispinTorture
(
TortureBase
):
class
TestCrispinTorture
(
TortureBase
):
# Mark Crispin's torture test from the SquirrelMail project
# Mark Crispin's torture test from the SquirrelMail project
def
test_mondo_message
(
self
):
def
test_mondo_message
(
self
):
...
@@ -50,7 +49,7 @@ class TestCrispinTorture(TortureBase):
...
@@ -50,7 +49,7 @@ class TestCrispinTorture(TortureBase):
neq
=
self
.
ndiffAssertEqual
neq
=
self
.
ndiffAssertEqual
msg
=
self
.
_msgobj
(
'crispin-torture.txt'
)
msg
=
self
.
_msgobj
(
'crispin-torture.txt'
)
payload
=
msg
.
get_payload
()
payload
=
msg
.
get_payload
()
eq
(
type
(
payload
),
ListType
)
eq
(
type
(
payload
),
list
)
eq
(
len
(
payload
),
12
)
eq
(
len
(
payload
),
12
)
eq
(
msg
.
preamble
,
None
)
eq
(
msg
.
preamble
,
None
)
eq
(
msg
.
epilogue
,
'
\n
'
)
eq
(
msg
.
epilogue
,
'
\n
'
)
...
@@ -113,7 +112,6 @@ multipart/mixed
...
@@ -113,7 +112,6 @@ multipart/mixed
audio/x-sun
audio/x-sun
"""
)
"""
)
def
_testclasses
():
def
_testclasses
():
mod
=
sys
.
modules
[
__name__
]
mod
=
sys
.
modules
[
__name__
]
return
[
getattr
(
mod
,
name
)
for
name
in
dir
(
mod
)
if
name
.
startswith
(
'Test'
)]
return
[
getattr
(
mod
,
name
)
for
name
in
dir
(
mod
)
if
name
.
startswith
(
'Test'
)]
...
@@ -131,6 +129,5 @@ def test_main():
...
@@ -131,6 +129,5 @@ def test_main():
run_unittest
(
testclass
)
run_unittest
(
testclass
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
unittest
.
main
(
defaultTest
=
'suite'
)
unittest
.
main
(
defaultTest
=
'suite'
)
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