mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
Issue #12285: multiprocessing.Pool() raises a ValueError if the number of
processes if negative or null.
This commit is contained in:
parent
4707a998e4
commit
2fae27b735
2 changed files with 5 additions and 0 deletions
|
|
@ -1089,6 +1089,9 @@ class _TestPool(BaseTestCase):
|
|||
self.assertEqual(sorted(it), list(map(sqr, list(range(1000)))))
|
||||
|
||||
def test_make_pool(self):
|
||||
self.assertRaises(ValueError, multiprocessing.Pool, -1)
|
||||
self.assertRaises(ValueError, multiprocessing.Pool, 0)
|
||||
|
||||
p = multiprocessing.Pool(3)
|
||||
self.assertEqual(3, len(p._pool))
|
||||
p.close()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue