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
d778e568
Kaydet (Commit)
d778e568
authored
Eki 14, 2010
tarafından
Antoine Pitrou
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Increase timeouts in test_ftplib (for very slow buildbots)
üst
8c8f1ac4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
test_ftplib.py
Lib/test/test_ftplib.py
+13
-13
No files found.
Lib/test/test_ftplib.py
Dosyayı görüntüle @
d778e568
...
...
@@ -102,7 +102,7 @@ class DummyFTPHandler(asynchat.async_chat):
addr
=
list
(
map
(
int
,
arg
.
split
(
','
)))
ip
=
'
%
d.
%
d.
%
d.
%
d'
%
tuple
(
addr
[:
4
])
port
=
(
addr
[
4
]
*
256
)
+
addr
[
5
]
s
=
socket
.
create_connection
((
ip
,
port
),
timeout
=
2
)
s
=
socket
.
create_connection
((
ip
,
port
),
timeout
=
10
)
self
.
dtp
=
self
.
dtp_handler
(
s
,
baseclass
=
self
)
self
.
push
(
'200 active data connection established'
)
...
...
@@ -110,7 +110,7 @@ class DummyFTPHandler(asynchat.async_chat):
sock
=
socket
.
socket
()
sock
.
bind
((
self
.
socket
.
getsockname
()[
0
],
0
))
sock
.
listen
(
5
)
sock
.
settimeout
(
2
)
sock
.
settimeout
(
10
)
ip
,
port
=
sock
.
getsockname
()[:
2
]
ip
=
ip
.
replace
(
'.'
,
','
);
p1
=
port
/
256
;
p2
=
port
%
256
self
.
push
(
'227 entering passive mode (
%
s,
%
d,
%
d)'
%
(
ip
,
p1
,
p2
))
...
...
@@ -120,7 +120,7 @@ class DummyFTPHandler(asynchat.async_chat):
def
cmd_eprt
(
self
,
arg
):
af
,
ip
,
port
=
arg
.
split
(
arg
[
0
])[
1
:
-
1
]
port
=
int
(
port
)
s
=
socket
.
create_connection
((
ip
,
port
),
timeout
=
2
)
s
=
socket
.
create_connection
((
ip
,
port
),
timeout
=
10
)
self
.
dtp
=
self
.
dtp_handler
(
s
,
baseclass
=
self
)
self
.
push
(
'200 active data connection established'
)
...
...
@@ -128,7 +128,7 @@ class DummyFTPHandler(asynchat.async_chat):
sock
=
socket
.
socket
(
socket
.
AF_INET6
)
sock
.
bind
((
self
.
socket
.
getsockname
()[
0
],
0
))
sock
.
listen
(
5
)
sock
.
settimeout
(
2
)
sock
.
settimeout
(
10
)
port
=
sock
.
getsockname
()[
1
]
self
.
push
(
'229 entering extended passive mode (|||
%
d|)'
%
port
)
conn
,
addr
=
sock
.
accept
()
...
...
@@ -409,7 +409,7 @@ class TestFTPClass(TestCase):
def
setUp
(
self
):
self
.
server
=
DummyFTPServer
((
HOST
,
0
))
self
.
server
.
start
()
self
.
client
=
ftplib
.
FTP
(
timeout
=
2
)
self
.
client
=
ftplib
.
FTP
(
timeout
=
10
)
self
.
client
.
connect
(
self
.
server
.
host
,
self
.
server
.
port
)
def
tearDown
(
self
):
...
...
@@ -555,7 +555,7 @@ class TestFTPClass(TestCase):
def
test_makepasv
(
self
):
host
,
port
=
self
.
client
.
makepasv
()
conn
=
socket
.
create_connection
((
host
,
port
),
2
)
conn
=
socket
.
create_connection
((
host
,
port
),
10
)
conn
.
close
()
# IPv4 is in use, just make sure send_epsv has not been used
self
.
assertEqual
(
self
.
server
.
handler_instance
.
last_received_cmd
,
'pasv'
)
...
...
@@ -573,7 +573,7 @@ class TestFTPClass(TestCase):
return
True
# base test
with
ftplib
.
FTP
(
timeout
=
2
)
as
self
.
client
:
with
ftplib
.
FTP
(
timeout
=
10
)
as
self
.
client
:
self
.
client
.
connect
(
self
.
server
.
host
,
self
.
server
.
port
)
self
.
client
.
sendcmd
(
'noop'
)
self
.
assertTrue
(
is_client_connected
())
...
...
@@ -581,7 +581,7 @@ class TestFTPClass(TestCase):
self
.
assertFalse
(
is_client_connected
())
# QUIT sent inside the with block
with
ftplib
.
FTP
(
timeout
=
2
)
as
self
.
client
:
with
ftplib
.
FTP
(
timeout
=
10
)
as
self
.
client
:
self
.
client
.
connect
(
self
.
server
.
host
,
self
.
server
.
port
)
self
.
client
.
sendcmd
(
'noop'
)
self
.
client
.
quit
()
...
...
@@ -591,7 +591,7 @@ class TestFTPClass(TestCase):
# force a wrong response code to be sent on QUIT: error_perm
# is expected and the connection is supposed to be closed
try
:
with
ftplib
.
FTP
(
timeout
=
2
)
as
self
.
client
:
with
ftplib
.
FTP
(
timeout
=
10
)
as
self
.
client
:
self
.
client
.
connect
(
self
.
server
.
host
,
self
.
server
.
port
)
self
.
client
.
sendcmd
(
'noop'
)
self
.
server
.
handler_instance
.
next_response
=
'550 error on quit'
...
...
@@ -639,7 +639,7 @@ class TestIPv6Environment(TestCase):
def
test_makepasv
(
self
):
host
,
port
=
self
.
client
.
makepasv
()
conn
=
socket
.
create_connection
((
host
,
port
),
2
)
conn
=
socket
.
create_connection
((
host
,
port
),
10
)
conn
.
close
()
self
.
assertEqual
(
self
.
server
.
handler_instance
.
last_received_cmd
,
'epsv'
)
...
...
@@ -664,7 +664,7 @@ class TestTLS_FTPClassMixin(TestFTPClass):
def
setUp
(
self
):
self
.
server
=
DummyTLS_FTPServer
((
HOST
,
0
))
self
.
server
.
start
()
self
.
client
=
ftplib
.
FTP_TLS
(
timeout
=
2
)
self
.
client
=
ftplib
.
FTP_TLS
(
timeout
=
10
)
self
.
client
.
connect
(
self
.
server
.
host
,
self
.
server
.
port
)
# enable TLS
self
.
client
.
auth
()
...
...
@@ -677,7 +677,7 @@ class TestTLS_FTPClass(TestCase):
def
setUp
(
self
):
self
.
server
=
DummyTLS_FTPServer
((
HOST
,
0
))
self
.
server
.
start
()
self
.
client
=
ftplib
.
FTP_TLS
(
timeout
=
2
)
self
.
client
=
ftplib
.
FTP_TLS
(
timeout
=
10
)
self
.
client
.
connect
(
self
.
server
.
host
,
self
.
server
.
port
)
def
tearDown
(
self
):
...
...
@@ -740,7 +740,7 @@ class TestTLS_FTPClass(TestCase):
self
.
assertRaises
(
ValueError
,
ftplib
.
FTP_TLS
,
certfile
=
CERTFILE
,
keyfile
=
CERTFILE
,
context
=
ctx
)
self
.
client
=
ftplib
.
FTP_TLS
(
context
=
ctx
,
timeout
=
2
)
self
.
client
=
ftplib
.
FTP_TLS
(
context
=
ctx
,
timeout
=
10
)
self
.
client
.
connect
(
self
.
server
.
host
,
self
.
server
.
port
)
self
.
assertNotIsInstance
(
self
.
client
.
sock
,
ssl
.
SSLSocket
)
self
.
client
.
auth
()
...
...
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