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
9844993c
Commit
9844993c
authored
Jun 05, 2012
by
Richard Oudkerk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for multiprocessing.Conditon.wait() and changset 3baeb5e13dd2
parent
f86a5e8a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
Lib/test/test_multiprocessing.py
Lib/test/test_multiprocessing.py
+28
-0
No files found.
Lib/test/test_multiprocessing.py
View file @
9844993c
...
...
@@ -956,6 +956,34 @@ class _TestCondition(BaseTestCase):
p
.
join
(
5
)
self
.
assertTrue
(
success
.
value
)
@
classmethod
def
_test_wait_result
(
cls
,
c
,
pid
):
with
c
:
c
.
notify
()
time
.
sleep
(
1
)
if
pid
is
not
None
:
os
.
kill
(
pid
,
signal
.
SIGINT
)
def
test_wait_result
(
self
):
if
isinstance
(
self
,
ProcessesMixin
)
and
sys
.
platform
!=
'win32'
:
pid
=
os
.
getpid
()
else
:
pid
=
None
c
=
self
.
Condition
()
with
c
:
self
.
assertFalse
(
c
.
wait
(
0
))
self
.
assertFalse
(
c
.
wait
(
0.1
))
p
=
self
.
Process
(
target
=
self
.
_test_wait_result
,
args
=
(
c
,
pid
))
p
.
start
()
self
.
assertTrue
(
c
.
wait
(
10
))
if
pid
is
not
None
:
self
.
assertRaises
(
KeyboardInterrupt
,
c
.
wait
,
10
)
p
.
join
()
class
_TestEvent
(
BaseTestCase
):
...
...
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