summaryrefslogtreecommitdiffstats
path: root/Lib/test/_test_multiprocessing.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/_test_multiprocessing.py')
-rw-r--r--Lib/test/_test_multiprocessing.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py
index 814aae8..dc59e9f 100644
--- a/Lib/test/_test_multiprocessing.py
+++ b/Lib/test/_test_multiprocessing.py
@@ -1114,6 +1114,14 @@ class _TestQueue(BaseTestCase):
# Assert that the serialization and the hook have been called correctly
self.assertTrue(not_serializable_obj.reduce_was_called)
self.assertTrue(not_serializable_obj.on_queue_feeder_error_was_called)
+
+ def test_closed_queue_put_get_exceptions(self):
+ for q in multiprocessing.Queue(), multiprocessing.JoinableQueue():
+ q.close()
+ with self.assertRaisesRegex(ValueError, 'is closed'):
+ q.put('foo')
+ with self.assertRaisesRegex(ValueError, 'is closed'):
+ q.get()
#
#
#