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
1703bbbf
Kaydet (Commit)
1703bbbf
authored
Şub 03, 2014
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Oops, undo unwanted changes in test_asyncio: mistakes of my the last sync with
Tulip (changeset d7ac90c0463a)
üst
e48d4db0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
8 deletions
+17
-8
test_base_events.py
Lib/test/test_asyncio/test_base_events.py
+8
-7
test_events.py
Lib/test/test_asyncio/test_events.py
+8
-0
test_windows_events.py
Lib/test/test_asyncio/test_windows_events.py
+1
-1
No files found.
Lib/test/test_asyncio/test_base_events.py
Dosyayı görüntüle @
1703bbbf
...
...
@@ -116,17 +116,18 @@ class BaseEventLoopTests(unittest.TestCase):
self
.
loop
.
stop
()
self
.
loop
.
_process_events
=
unittest
.
mock
.
Mock
()
when
=
self
.
loop
.
time
()
+
0.1
delay
=
0.1
when
=
self
.
loop
.
time
()
+
delay
self
.
loop
.
call_at
(
when
,
cb
)
t0
=
self
.
loop
.
time
()
self
.
loop
.
run_forever
()
dt
=
self
.
loop
.
time
()
-
t0
self
.
assertTrue
(
0.09
<=
dt
<=
0.9
,
# Issue #20452: add more info in case of failure,
# to try to investigate the bug
(
dt
,
self
.
loop
.
_granularity
,
time
.
get_clock_info
(
'monotonic'
)))
self
.
assertGreaterEqual
(
dt
,
delay
-
self
.
loop
.
_granularity
,
dt
)
# tolerate a difference of +800 ms because some Python buildbots
# are really slow
self
.
assertLessEqual
(
dt
,
0.9
,
dt
)
def
test_run_once_in_executor_handle
(
self
):
def
cb
():
...
...
Lib/test/test_asyncio/test_events.py
Dosyayı görüntüle @
1703bbbf
...
...
@@ -1185,6 +1185,14 @@ class EventLoopTestsMixin:
calls
.
append
(
self
.
loop
.
_run_once_counter
)
self
.
assertEqual
(
calls
,
[
1
,
3
,
5
,
6
])
def
test_granularity
(
self
):
granularity
=
self
.
loop
.
_granularity
self
.
assertGreater
(
granularity
,
0.0
)
# Worst expected granularity: 1 ms on Linux (limited by poll/epoll
# resolution), 15.6 ms on Windows (limited by time.monotonic
# resolution)
self
.
assertLess
(
granularity
,
0.050
)
class
SubprocessTestsMixin
:
...
...
Lib/test/test_asyncio/test_windows_events.py
Dosyayı görüntüle @
1703bbbf
...
...
@@ -105,7 +105,7 @@ class ProactorTests(unittest.TestCase):
self
.
loop
.
run_until_complete
(
f
)
elapsed
=
self
.
loop
.
time
()
-
start
self
.
assertFalse
(
f
.
result
())
self
.
assertTrue
(
0.18
<
elapsed
<
0.
5
,
elapsed
)
self
.
assertTrue
(
0.18
<
elapsed
<
0.
9
,
elapsed
)
_overlapped
.
SetEvent
(
event
)
...
...
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