mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-38377: Add support.skip_if_broken_multiprocessing_synchronize() (GH-20944)
On Linux, skip tests using multiprocessing if the current user cannot create a file in /dev/shm/ directory. Add the skip_if_broken_multiprocessing_synchronize() function to the test.support module.
This commit is contained in:
parent
2c2a4f3d85
commit
ddbeb2f3e0
9 changed files with 48 additions and 12 deletions
|
@ -3630,9 +3630,9 @@ if hasattr(logging.handlers, 'QueueListener'):
|
|||
|
||||
@patch.object(logging.handlers.QueueListener, 'handle')
|
||||
def test_handle_called_with_mp_queue(self, mock_handle):
|
||||
# Issue 28668: The multiprocessing (mp) module is not functional
|
||||
# bpo-28668: The multiprocessing (mp) module is not functional
|
||||
# when the mp.synchronize module cannot be imported.
|
||||
support.import_module('multiprocessing.synchronize')
|
||||
support.skip_if_broken_multiprocessing_synchronize()
|
||||
for i in range(self.repeat):
|
||||
log_queue = multiprocessing.Queue()
|
||||
self.setup_and_log(log_queue, '%s_%s' % (self.id(), i))
|
||||
|
@ -3656,9 +3656,9 @@ if hasattr(logging.handlers, 'QueueListener'):
|
|||
indicates that messages were not registered on the queue until
|
||||
_after_ the QueueListener stopped.
|
||||
"""
|
||||
# Issue 28668: The multiprocessing (mp) module is not functional
|
||||
# bpo-28668: The multiprocessing (mp) module is not functional
|
||||
# when the mp.synchronize module cannot be imported.
|
||||
support.import_module('multiprocessing.synchronize')
|
||||
support.skip_if_broken_multiprocessing_synchronize()
|
||||
for i in range(self.repeat):
|
||||
queue = multiprocessing.Queue()
|
||||
self.setup_and_log(queue, '%s_%s' %(self.id(), i))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue