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
146b7ab8
Commit
146b7ab8
authored
Jul 02, 2008
by
Jesse Noller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reenable the manager tests with Amaury's threading fix
parent
c060b0e7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
17 deletions
+13
-17
Lib/test/test_multiprocessing.py
Lib/test/test_multiprocessing.py
+13
-17
No files found.
Lib/test/test_multiprocessing.py
View file @
146b7ab8
...
...
@@ -960,7 +960,6 @@ class _TestContainers(BaseTestCase):
def
sqr
(
x
,
wait
=
0.0
):
time
.
sleep
(
wait
)
return
x
*
x
"""
class
_TestPool
(
BaseTestCase
):
def
test_apply
(
self
):
...
...
@@ -1030,7 +1029,6 @@ class _TestPool(BaseTestCase):
join
=
TimingWrapper
(
self
.
pool
.
join
)
join
()
self
.
assertTrue
(
join
.
elapsed
<
0.2
)
"""
#
# Test that manager has expected number of shared objects left
#
...
...
@@ -1333,7 +1331,6 @@ class _TestConnection(BaseTestCase):
self
.
assertRaises
(
ValueError
,
a
.
send_bytes
,
msg
,
4
,
-
1
)
"""
class
_TestListenerClient
(
BaseTestCase
):
ALLOWED_TYPES
=
(
'processes'
,
'threads'
)
...
...
@@ -1353,7 +1350,6 @@ class _TestListenerClient(BaseTestCase):
self
.
assertEqual
(
conn
.
recv
(),
'hello'
)
p
.
join
()
l
.
close
()
"""
#
# Test of sending connection and socket objects between processes
#
...
...
@@ -1769,28 +1765,28 @@ def test_main(run=None):
multiprocessing
.
get_logger
().
setLevel
(
LOG_LEVEL
)
#
ProcessesMixin.pool = multiprocessing.Pool(4)
#
ThreadsMixin.pool = multiprocessing.dummy.Pool(4)
#
ManagerMixin.manager.__init__()
#
ManagerMixin.manager.start()
#
ManagerMixin.pool = ManagerMixin.manager.Pool(4)
ProcessesMixin
.
pool
=
multiprocessing
.
Pool
(
4
)
ThreadsMixin
.
pool
=
multiprocessing
.
dummy
.
Pool
(
4
)
ManagerMixin
.
manager
.
__init__
()
ManagerMixin
.
manager
.
start
()
ManagerMixin
.
pool
=
ManagerMixin
.
manager
.
Pool
(
4
)
testcases
=
(
sorted
(
testcases_processes
.
values
(),
key
=
lambda
tc
:
tc
.
__name__
)
#
+
#
sorted(testcases_threads.values(), key=lambda tc:tc.__name__) +
#
sorted(testcases_manager.values(), key=lambda tc:tc.__name__)
sorted
(
testcases_processes
.
values
(),
key
=
lambda
tc
:
tc
.
__name__
)
+
sorted
(
testcases_threads
.
values
(),
key
=
lambda
tc
:
tc
.
__name__
)
+
sorted
(
testcases_manager
.
values
(),
key
=
lambda
tc
:
tc
.
__name__
)
)
loadTestsFromTestCase
=
unittest
.
defaultTestLoader
.
loadTestsFromTestCase
suite
=
unittest
.
TestSuite
(
loadTestsFromTestCase
(
tc
)
for
tc
in
testcases
)
run
(
suite
)
#
ThreadsMixin.pool.terminate()
#
ProcessesMixin.pool.terminate()
#
ManagerMixin.pool.terminate()
#
ManagerMixin.manager.shutdown()
ThreadsMixin
.
pool
.
terminate
()
ProcessesMixin
.
pool
.
terminate
()
ManagerMixin
.
pool
.
terminate
()
ManagerMixin
.
manager
.
shutdown
()
#
del ProcessesMixin.pool, ThreadsMixin.pool, ManagerMixin.pool
del
ProcessesMixin
.
pool
,
ThreadsMixin
.
pool
,
ManagerMixin
.
pool
def
main
():
test_main
(
unittest
.
TextTestRunner
(
verbosity
=
2
).
run
)
...
...
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