diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-06-20 15:53:35 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-06-20 15:53:35 (GMT) |
commit | 2fae27b735f4d93c8a7789a7a98857e1ce3c7193 (patch) | |
tree | 82049c5c1c54d684d81f979b201d9643d124a3ea /Lib/test/test_multiprocessing.py | |
parent | 4707a998e4a0a0587dd6265e0c8c64588ab23712 (diff) | |
download | cpython-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.py | 3 |
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() |