diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-06-20 15:54:03 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-06-20 15:54:03 (GMT) |
commit | 395dc58ee784087547115b684b2b39f40655ac47 (patch) | |
tree | 2eec97f48e097ccf5b7be0e08f8f1c223ed8ae19 /Lib/test/test_multiprocessing.py | |
parent | fb25ba9b073ddcec602700484ff5fc2b1bea1a59 (diff) | |
parent | 2fae27b735f4d93c8a7789a7a98857e1ce3c7193 (diff) | |
download | cpython-395dc58ee784087547115b684b2b39f40655ac47.zip cpython-395dc58ee784087547115b684b2b39f40655ac47.tar.gz cpython-395dc58ee784087547115b684b2b39f40655ac47.tar.bz2 |
(merge 3.2) 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.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_multiprocessing.py b/Lib/test/test_multiprocessing.py index 85094cc..b752d8d 100644 --- a/Lib/test/test_multiprocessing.py +++ b/Lib/test/test_multiprocessing.py @@ -1138,6 +1138,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() |