summaryrefslogtreecommitdiff
path: root/Lib/test/test_logging.py
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-06-18 14:53:19 +0200
committerGitHub <noreply@github.com>2020-06-18 14:53:19 +0200
commitddbeb2f3e02a510c5784ffd74c5e09e8c70b5881 (patch)
tree5d992ac64b1be1b2329c398fc82323b2e433a344 /Lib/test/test_logging.py
parent2c2a4f3d8545784c6e4ca8128bfc706916080712 (diff)
downloadcpython-git-ddbeb2f3e02a510c5784ffd74c5e09e8c70b5881.tar.gz
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.
Diffstat (limited to 'Lib/test/test_logging.py')
-rw-r--r--Lib/test/test_logging.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index 275ce2e45f..e719d264a9 100644
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -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))