Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
b9da7631
Commit
b9da7631
authored
Nov 02, 2010
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test__pool.py: add another test case for imap_unordered
parent
67ae3668
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
greentest/test__pool.py
greentest/test__pool.py
+13
-0
No files found.
greentest/test__pool.py
View file @
b9da7631
...
...
@@ -251,6 +251,19 @@ class TestPool(greentest.TestCase):
kill
()
assert
kill
.
elapsed
<
0.5
,
kill
.
elapsed
def
sleep
(
self
,
x
):
gevent
.
sleep
(
float
(
x
)
/
10.
)
return
str
(
x
)
def
test_imap_unordered_sleep
(
self
):
# testing that imap_unordered returns items in competion order
result
=
list
(
self
.
pool
.
imap_unordered
(
self
.
sleep
,
[
10
,
1
,
2
]))
if
self
.
pool
.
size
==
1
:
expected
=
[
'10'
,
'1'
,
'2'
]
else
:
expected
=
[
'1'
,
'2'
,
'10'
]
self
.
assertEqual
(
result
,
expected
)
class
TestPool2
(
TestPool
):
size
=
2
...
...
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