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
fdb6bb56
Kaydet (Commit)
fdb6bb56
authored
Şub 03, 2008
tarafından
Christian Heimes
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed socketserver tests
üst
292d351f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
test_socketserver.py
Lib/test/test_socketserver.py
+9
-9
No files found.
Lib/test/test_socketserver.py
Dosyayı görüntüle @
fdb6bb56
...
...
@@ -190,28 +190,28 @@ class SocketServerTest(unittest.TestCase):
for
svrcls
in
servers
:
addr
=
self
.
pickaddr
(
proto
)
if
verbose
:
print
"ADDR ="
,
addr
print
"CLASS ="
,
svrcls
print
(
"ADDR ="
,
addr
)
print
(
"CLASS ="
,
svrcls
)
t
=
ServerThread
(
addr
,
svrcls
,
hdlrcls
)
if
verbose
:
print
"server created"
if
verbose
:
print
(
"server created"
)
t
.
start
()
if
verbose
:
print
"server running"
if
verbose
:
print
(
"server running"
)
for
i
in
range
(
NREQ
):
t
.
ready
.
wait
(
10
*
DELAY
)
self
.
assert_
(
t
.
ready
.
isSet
(),
"Server not ready within a reasonable time"
)
if
verbose
:
print
"test client"
,
i
if
verbose
:
print
(
"test client"
,
i
)
testfunc
(
proto
,
addr
)
if
verbose
:
print
"waiting for server"
if
verbose
:
print
(
"waiting for server"
)
t
.
join
()
if
verbose
:
print
"done"
if
verbose
:
print
(
"done"
)
def
stream_examine
(
self
,
proto
,
addr
):
s
=
socket
.
socket
(
proto
,
socket
.
SOCK_STREAM
)
s
.
connect
(
addr
)
s
.
sendall
(
TEST_STR
)
buf
=
data
=
receive
(
s
,
100
)
while
data
and
'
\n
'
not
in
buf
:
while
data
and
b
'
\n
'
not
in
buf
:
data
=
receive
(
s
,
100
)
buf
+=
data
self
.
assertEquals
(
buf
,
TEST_STR
)
...
...
@@ -221,7 +221,7 @@ class SocketServerTest(unittest.TestCase):
s
=
socket
.
socket
(
proto
,
socket
.
SOCK_DGRAM
)
s
.
sendto
(
TEST_STR
,
addr
)
buf
=
data
=
receive
(
s
,
100
)
while
data
and
'
\n
'
not
in
buf
:
while
data
and
b
'
\n
'
not
in
buf
:
data
=
receive
(
s
,
100
)
buf
+=
data
self
.
assertEquals
(
buf
,
TEST_STR
)
...
...
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