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
6e533f04
Kaydet (Commit)
6e533f04
authored
Kas 08, 2011
tarafından
Jesus Cea
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
MERGE: Partial patch for issue #11812: Take care of test_telnetlib.py
üst
0fd66b8f
bc91b469
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
test_telnetlib.py
Lib/test/test_telnetlib.py
+6
-6
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/test/test_telnetlib.py
Dosyayı görüntüle @
6e533f04
...
...
@@ -15,10 +15,9 @@ def server(evt, serv):
evt
.
set
()
try
:
conn
,
addr
=
serv
.
accept
()
conn
.
close
()
except
socket
.
timeout
:
pass
else
:
conn
.
close
()
finally
:
serv
.
close
()
...
...
@@ -27,9 +26,10 @@ class GeneralTests(TestCase):
def
setUp
(
self
):
self
.
evt
=
threading
.
Event
()
self
.
sock
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
self
.
sock
.
settimeout
(
3
)
self
.
sock
.
settimeout
(
60
)
# Safety net. Look issue 11812
self
.
port
=
support
.
bind_port
(
self
.
sock
)
self
.
thread
=
threading
.
Thread
(
target
=
server
,
args
=
(
self
.
evt
,
self
.
sock
))
self
.
thread
.
setDaemon
(
True
)
self
.
thread
.
start
()
self
.
evt
.
wait
()
...
...
@@ -46,7 +46,7 @@ class GeneralTests(TestCase):
self
.
assertTrue
(
socket
.
getdefaulttimeout
()
is
None
)
socket
.
setdefaulttimeout
(
30
)
try
:
telnet
=
telnetlib
.
Telnet
(
"localhost"
,
self
.
port
)
telnet
=
telnetlib
.
Telnet
(
HOST
,
self
.
port
)
finally
:
socket
.
setdefaulttimeout
(
None
)
self
.
assertEqual
(
telnet
.
sock
.
gettimeout
(),
30
)
...
...
@@ -64,13 +64,13 @@ class GeneralTests(TestCase):
telnet
.
sock
.
close
()
def
testTimeoutValue
(
self
):
telnet
=
telnetlib
.
Telnet
(
"localhost"
,
self
.
port
,
timeout
=
30
)
telnet
=
telnetlib
.
Telnet
(
HOST
,
self
.
port
,
timeout
=
30
)
self
.
assertEqual
(
telnet
.
sock
.
gettimeout
(),
30
)
telnet
.
sock
.
close
()
def
testTimeoutOpen
(
self
):
telnet
=
telnetlib
.
Telnet
()
telnet
.
open
(
"localhost"
,
self
.
port
,
timeout
=
30
)
telnet
.
open
(
HOST
,
self
.
port
,
timeout
=
30
)
self
.
assertEqual
(
telnet
.
sock
.
gettimeout
(),
30
)
telnet
.
sock
.
close
()
...
...
Misc/NEWS
Dosyayı görüntüle @
6e533f04
...
...
@@ -1616,6 +1616,9 @@ Tests
-
Skip
network
tests
when
getaddrinfo
()
returns
EAI_AGAIN
,
meaning
a
temporary
failure
in
name
resolution
.
-
Issue
#
11812
:
Solve
transient
socket
failure
to
connect
to
'localhost'
in
test_telnetlib
.
py
.
-
Solved
a
potential
deadlock
in
test_telnetlib
.
py
.
Related
to
issue
#
11812.
-
Avoid
failing
in
test_robotparser
when
mueblesmoraleda
.
com
is
flaky
and
...
...
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