Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
64362c41
Commit
64362c41
authored
Oct 18, 2013
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Relax some asyncio test timeouts (
http://bugs.python.org/issue19285
).
parent
3ba37b3d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
Lib/test/test_asyncio/test_base_events.py
Lib/test/test_asyncio/test_base_events.py
+1
-1
Lib/test/test_asyncio/test_events.py
Lib/test/test_asyncio/test_events.py
+4
-4
No files found.
Lib/test/test_asyncio/test_base_events.py
View file @
64362c41
...
...
@@ -121,7 +121,7 @@ class BaseEventLoopTests(unittest.TestCase):
t0
=
self
.
loop
.
time
()
self
.
loop
.
run_forever
()
t1
=
self
.
loop
.
time
()
self
.
assertTrue
(
0.09
<=
t1
-
t0
<=
0.
12
,
t1
-
t0
)
self
.
assertTrue
(
0.09
<=
t1
-
t0
<=
0.
9
,
t1
-
t0
)
def
test_run_once_in_executor_handle
(
self
):
def
cb
():
...
...
Lib/test/test_asyncio/test_events.py
View file @
64362c41
...
...
@@ -215,7 +215,7 @@ class EventLoopTestsMixin:
t0
=
self
.
loop
.
time
()
self
.
loop
.
run_until_complete
(
tasks
.
sleep
(
0.1
,
loop
=
self
.
loop
))
t1
=
self
.
loop
.
time
()
self
.
assertTrue
(
0.08
<=
t1
-
t0
<=
0.
12
,
t1
-
t0
)
self
.
assertTrue
(
0.08
<=
t1
-
t0
<=
0.
8
,
t1
-
t0
)
def
test_run_until_complete_stopped
(
self
):
@
tasks
.
coroutine
...
...
@@ -238,7 +238,7 @@ class EventLoopTestsMixin:
self
.
loop
.
run_forever
()
t1
=
time
.
monotonic
()
self
.
assertEqual
(
results
,
[
'hello world'
])
self
.
assertTrue
(
0.08
<=
t1
-
t0
<=
0.
2
,
t1
-
t0
)
self
.
assertTrue
(
0.08
<=
t1
-
t0
<=
0.
8
,
t1
-
t0
)
def
test_call_soon
(
self
):
results
=
[]
...
...
@@ -462,8 +462,8 @@ class EventLoopTestsMixin:
self
.
loop
.
add_signal_handler
(
signal
.
SIGALRM
,
my_handler
,
*
some_args
)
signal
.
setitimer
(
signal
.
ITIMER_REAL
,
0.
0
1
,
0
)
# Send SIGALRM once.
self
.
loop
.
call_later
(
0.
01
5
,
self
.
loop
.
stop
)
signal
.
setitimer
(
signal
.
ITIMER_REAL
,
0.1
,
0
)
# Send SIGALRM once.
self
.
loop
.
call_later
(
0.5
,
self
.
loop
.
stop
)
self
.
loop
.
run_forever
()
self
.
assertEqual
(
caught
,
1
)
...
...
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