summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_multiprocessing.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-06-20 15:53:35 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-06-20 15:53:35 (GMT)
commit2fae27b735f4d93c8a7789a7a98857e1ce3c7193 (patch)
tree82049c5c1c54d684d81f979b201d9643d124a3ea /Lib/test/test_multiprocessing.py
parent4707a998e4a0a0587dd6265e0c8c64588ab23712 (diff)
downloadcpython-2fae27b735f4d93c8a7789a7a98857e1ce3c7193.zip
cpython-2fae27b735f4d93c8a7789a7a98857e1ce3c7193.tar.gz
cpython-2fae27b735f4d93c8a7789a7a98857e1ce3c7193.tar.bz2
Issue #12285: multiprocessing.Pool() raises a ValueError if the number of
processes if negative or null.
Diffstat (limited to 'Lib/test/test_multiprocessing.py')
-rw-r--r--Lib/test/test_multiprocessing.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_multiprocessing.py b/Lib/test/test_multiprocessing.py
index 2614689..dc41e15 100644
--- a/Lib/test/test_multiprocessing.py
+++ b/Lib/test/test_multiprocessing.py
@@ -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()