mirror of
https://github.com/python/cpython.git
synced 2025-10-21 14:12:27 +00:00
raise a ValueError instead of an AssertionError when pool is an invalid state
This commit is contained in:
parent
3331a20464
commit
3095f4724e
2 changed files with 10 additions and 8 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue