MCPcopy Index your code
hub / github.com/python/cpython / test_empty_exceptions

Method test_empty_exceptions

Lib/test/_test_multiprocessing.py:6423–6430  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

6421 parent_can_continue.set()
6422
6423 def test_empty_exceptions(self):
6424 # Assert that checking emptiness of a closed queue raises
6425 # an OSError, independently of whether the queue was used
6426 # or not. This differs from Queue and JoinableQueue.
6427 q = multiprocessing.SimpleQueue()
6428 q.close() # close the pipe
6429 with self.assertRaisesRegex(OSError, 'is closed'):
6430 q.empty()
6431
6432 @warnings_helper.ignore_fork_in_thread_deprecation_warnings()
6433 def test_empty(self):

Callers

nothing calls this directly

Calls 4

closeMethod · 0.95
emptyMethod · 0.95
SimpleQueueMethod · 0.80
assertRaisesRegexMethod · 0.80

Tested by

no test coverage detected