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
71f73ca7
Commit
71f73ca7
authored
Apr 23, 2015
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #23713: Fixed fragility of test_imap_unordered_handle_iterable_exception.
Patch by Davin Potts.
parent
3bd66abb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
Lib/test/_test_multiprocessing.py
Lib/test/_test_multiprocessing.py
+8
-2
No files found.
Lib/test/_test_multiprocessing.py
View file @
71f73ca7
...
...
@@ -1799,17 +1799,23 @@ class _TestPool(BaseTestCase):
it
=
self
.
pool
.
imap_unordered
(
sqr
,
exception_throwing_generator
(
10
,
3
),
1
)
expected_values
=
list
(
map
(
sqr
,
list
(
range
(
10
))))
with
self
.
assertRaises
(
SayWhenError
):
# imap_unordered makes it difficult to anticipate the SayWhenError
for
i
in
range
(
10
):
self
.
assertEqual
(
next
(
it
),
i
*
i
)
value
=
next
(
it
)
self
.
assertIn
(
value
,
expected_values
)
expected_values
.
remove
(
value
)
it
=
self
.
pool
.
imap_unordered
(
sqr
,
exception_throwing_generator
(
20
,
7
),
2
)
expected_values
=
list
(
map
(
sqr
,
list
(
range
(
20
))))
with
self
.
assertRaises
(
SayWhenError
):
for
i
in
range
(
20
):
self
.
assertEqual
(
next
(
it
),
i
*
i
)
value
=
next
(
it
)
self
.
assertIn
(
value
,
expected_values
)
expected_values
.
remove
(
value
)
def
test_make_pool
(
self
):
self
.
assertRaises
(
ValueError
,
multiprocessing
.
Pool
,
-
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