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
35777505
Commit
35777505
authored
Jun 11, 2011
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add TestErrorInIterator to test__pool.py
parent
819169f1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
greentest/test__pool.py
greentest/test__pool.py
+16
-0
No files found.
greentest/test__pool.py
View file @
35777505
...
...
@@ -4,6 +4,7 @@ from gevent import pool
from
gevent.event
import
Event
import
greentest
import
random
from
greentest
import
ExpectedException
class
TestCoroutinePool
(
greentest
.
TestCase
):
...
...
@@ -346,5 +347,20 @@ class TestSpawn(greentest.TestCase):
self
.
assertEqual
(
len
(
p
),
0
)
class
TestErrorInIterator
(
greentest
.
TestCase
):
error_fatal
=
False
def
test
(
self
):
p
=
pool
.
Pool
(
3
)
def
iter
():
yield
1
yield
2
raise
ExpectedException
self
.
assertRaises
(
ExpectedException
,
p
.
map
,
lambda
x
:
None
,
iter
())
def
unordered
(
*
args
):
return
list
(
p
.
imap_unordered
(
*
args
))
self
.
assertRaises
(
ExpectedException
,
unordered
,
lambda
x
:
None
,
iter
())
if
__name__
==
'__main__'
:
greentest
.
main
()
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