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
f72119d1
Kaydet (Commit)
f72119d1
authored
Mar 21, 2013
tarafından
Gregory P. Smith
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
merge heads
üst
40a2160a
30307281
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
test_smtplib.py
Lib/test/test_smtplib.py
+6
-3
threading.py
Lib/threading.py
+1
-2
No files found.
Lib/test/test_smtplib.py
Dosyayı görüntüle @
f72119d1
...
...
@@ -662,12 +662,12 @@ class SimSMTPChannel(smtpd.SMTPChannel):
if
self
.
rcpt_response
is
None
:
super
()
.
smtp_RCPT
(
arg
)
return
self
.
push
(
self
.
rcpt_response
[
self
.
rcpt_count
])
self
.
rcpt_count
+=
1
self
.
push
(
self
.
rcpt_response
[
self
.
rcpt_count
-
1
])
def
smtp_RSET
(
self
,
arg
):
super
()
.
smtp_RSET
(
arg
)
self
.
rset_count
+=
1
super
()
.
smtp_RSET
(
arg
)
def
smtp_DATA
(
self
,
arg
):
if
self
.
data_response
is
None
:
...
...
@@ -842,14 +842,16 @@ class SMTPSimTests(unittest.TestCase):
# Issue 5713: make sure close, not rset, is called if we get a 421 error
def
test_421_from_mail_cmd
(
self
):
smtp
=
smtplib
.
SMTP
(
HOST
,
self
.
port
,
local_hostname
=
'localhost'
,
timeout
=
15
)
smtp
.
noop
()
self
.
serv
.
_SMTPchannel
.
mail_response
=
'421 closing connection'
with
self
.
assertRaises
(
smtplib
.
SMTPSenderRefused
):
smtp
.
sendmail
(
'John'
,
'Sally'
,
'test message'
)
self
.
assertIsNone
(
smtp
.
sock
)
self
.
assertEqual
(
self
.
serv
.
_SMTPchannel
.
r
cp
t_count
,
0
)
self
.
assertEqual
(
self
.
serv
.
_SMTPchannel
.
r
se
t_count
,
0
)
def
test_421_from_rcpt_cmd
(
self
):
smtp
=
smtplib
.
SMTP
(
HOST
,
self
.
port
,
local_hostname
=
'localhost'
,
timeout
=
15
)
smtp
.
noop
()
self
.
serv
.
_SMTPchannel
.
rcpt_response
=
[
'250 accepted'
,
'421 closing'
]
with
self
.
assertRaises
(
smtplib
.
SMTPRecipientsRefused
)
as
r
:
smtp
.
sendmail
(
'John'
,
[
'Sally'
,
'Frank'
,
'George'
],
'test message'
)
...
...
@@ -866,6 +868,7 @@ class SMTPSimTests(unittest.TestCase):
super
()
.
found_terminator
()
self
.
serv
.
channel_class
=
MySimSMTPChannel
smtp
=
smtplib
.
SMTP
(
HOST
,
self
.
port
,
local_hostname
=
'localhost'
,
timeout
=
15
)
smtp
.
noop
()
with
self
.
assertRaises
(
smtplib
.
SMTPDataError
):
smtp
.
sendmail
(
'John@foo.org'
,
[
'Sally@foo.org'
],
'test message'
)
self
.
assertIsNone
(
smtp
.
sock
)
...
...
Lib/threading.py
Dosyayı görüntüle @
f72119d1
...
...
@@ -10,11 +10,10 @@ except ImportError:
from
time
import
time
as
_time
from
traceback
import
format_exc
as
_format_exc
from
_weakrefset
import
WeakSet
from
itertools
import
islice
as
_islice
try
:
from
_itertools
import
islice
as
_slice
from
_collections
import
deque
as
_deque
except
ImportError
:
from
itertools
import
islice
as
_islice
from
collections
import
deque
as
_deque
# Note regarding PEP 8 compliant names
...
...
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