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
f61d0790
Kaydet (Commit)
f61d0790
authored
Mar 31, 2013
tarafından
Charles-Francois Natali
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Issue #6419: Fix a test_kqueue failure on some BSD flavors.
üst
2b3a35b5
7a03e2d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
22 deletions
+13
-22
test_kqueue.py
Lib/test/test_kqueue.py
+13
-22
No files found.
Lib/test/test_kqueue.py
Dosyayı görüntüle @
f61d0790
...
...
@@ -101,11 +101,6 @@ class TestKQueue(unittest.TestCase):
pass
# FreeBSD doesn't raise an exception here
server
,
addr
=
serverSocket
.
accept
()
if
sys
.
platform
.
startswith
(
"darwin"
):
flags
=
select
.
KQ_EV_ADD
|
select
.
KQ_EV_ENABLE
else
:
flags
=
0
kq
=
select
.
kqueue
()
kq2
=
select
.
kqueue
.
fromfd
(
kq
.
fileno
())
...
...
@@ -127,11 +122,10 @@ class TestKQueue(unittest.TestCase):
kq2
.
control
([
ev
],
0
)
events
=
kq
.
control
(
None
,
4
,
1
)
events
=
[(
e
.
ident
,
e
.
filter
,
e
.
flags
)
for
e
in
events
]
events
.
sort
()
self
.
assertEqual
(
events
,
[
(
client
.
fileno
(),
select
.
KQ_FILTER_WRITE
,
flags
),
(
server
.
fileno
(),
select
.
KQ_FILTER_WRITE
,
flags
)])
events
=
set
((
e
.
ident
,
e
.
filter
)
for
e
in
events
)
self
.
assertEqual
(
events
,
set
([
(
client
.
fileno
(),
select
.
KQ_FILTER_WRITE
),
(
server
.
fileno
(),
select
.
KQ_FILTER_WRITE
)]))
client
.
send
(
b
"Hello!"
)
server
.
send
(
b
"world!!!"
)
...
...
@@ -145,14 +139,12 @@ class TestKQueue(unittest.TestCase):
else
:
self
.
fail
(
'timeout waiting for event notifications'
)
events
=
[(
e
.
ident
,
e
.
filter
,
e
.
flags
)
for
e
in
events
]
events
.
sort
()
self
.
assertEqual
(
events
,
[
(
client
.
fileno
(),
select
.
KQ_FILTER_WRITE
,
flags
),
(
client
.
fileno
(),
select
.
KQ_FILTER_READ
,
flags
),
(
server
.
fileno
(),
select
.
KQ_FILTER_WRITE
,
flags
),
(
server
.
fileno
(),
select
.
KQ_FILTER_READ
,
flags
)])
events
=
set
((
e
.
ident
,
e
.
filter
)
for
e
in
events
)
self
.
assertEqual
(
events
,
set
([
(
client
.
fileno
(),
select
.
KQ_FILTER_WRITE
),
(
client
.
fileno
(),
select
.
KQ_FILTER_READ
),
(
server
.
fileno
(),
select
.
KQ_FILTER_WRITE
),
(
server
.
fileno
(),
select
.
KQ_FILTER_READ
)]))
# Remove completely client, and server read part
ev
=
select
.
kevent
(
client
.
fileno
(),
...
...
@@ -169,10 +161,9 @@ class TestKQueue(unittest.TestCase):
kq
.
control
([
ev
],
0
,
0
)
events
=
kq
.
control
([],
4
,
0.99
)
events
=
[(
e
.
ident
,
e
.
filter
,
e
.
flags
)
for
e
in
events
]
events
.
sort
()
self
.
assertEqual
(
events
,
[
(
server
.
fileno
(),
select
.
KQ_FILTER_WRITE
,
flags
)])
events
=
set
((
e
.
ident
,
e
.
filter
)
for
e
in
events
)
self
.
assertEqual
(
events
,
set
([
(
server
.
fileno
(),
select
.
KQ_FILTER_WRITE
)]))
client
.
close
()
server
.
close
()
...
...
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