diff options
author | Benjamin Peterson <benjamin@python.org> | 2012-09-25 16:45:42 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2012-09-25 16:45:42 (GMT) |
commit | 3095f4724ec7ca735dfae5c9bd3925c27688a115 (patch) | |
tree | 668e6da00578ed86004a27bd300833e3a3cb8730 /Lib/test/test_multiprocessing.py | |
parent | 3331a20464d7018e8e0b0f7710690dd1575be3b6 (diff) | |
download | cpython-3095f4724ec7ca735dfae5c9bd3925c27688a115.zip cpython-3095f4724ec7ca735dfae5c9bd3925c27688a115.tar.gz cpython-3095f4724ec7ca735dfae5c9bd3925c27688a115.tar.bz2 |
raise a ValueError instead of an AssertionError when pool is an invalid state
Diffstat (limited to 'Lib/test/test_multiprocessing.py')
-rw-r--r-- | Lib/test/test_multiprocessing.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_multiprocessing.py b/Lib/test/test_multiprocessing.py index b70783a..e313dd6 100644 --- a/Lib/test/test_multiprocessing.py +++ b/Lib/test/test_multiprocessing.py @@ -1727,7 +1727,8 @@ class _TestPool(BaseTestCase): with multiprocessing.Pool(2) as p: r = p.map_async(sqr, L) self.assertEqual(r.get(), expected) - self.assertRaises(AssertionError, p.map_async, sqr, L) + print(p._state) + self.assertRaises(ValueError, p.map_async, sqr, L) def raising(): raise KeyError("key") |