gh-95212: make multiprocessing test case parallel-safe (GH-95213)

This commit is contained in:
Christian Heimes 2022-07-25 06:44:40 +02:00 committed by GitHub
parent 3e718cf880
commit 5956de16cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -3973,7 +3973,7 @@ class _TestSharedMemory(BaseTestCase):
'multiprocessing.shared_memory._make_filename') as mock_make_filename:
NAME_PREFIX = shared_memory._SHM_NAME_PREFIX
names = ['test01_fn', 'test02_fn']
names = [self._new_shm_name('test03_fn'), self._new_shm_name('test04_fn')]
# Prepend NAME_PREFIX which can be '/psm_' or 'wnsm_', necessary
# because some POSIX compliant systems require name to start with /
names = [NAME_PREFIX + name for name in names]