Skip to content

Commit 5956de1

Browse files
authored
gh-95212: make multiprocessing test case parallel-safe (GH-95213)
1 parent 3e718cf commit 5956de1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Lib/test/_test_multiprocessing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3973,7 +3973,7 @@ def test_shared_memory_recreate(self):
39733973
'multiprocessing.shared_memory._make_filename') as mock_make_filename:
39743974

39753975
NAME_PREFIX = shared_memory._SHM_NAME_PREFIX
3976-
names = ['test01_fn', 'test02_fn']
3976+
names = [self._new_shm_name('test03_fn'), self._new_shm_name('test04_fn')]
39773977
# Prepend NAME_PREFIX which can be '/psm_' or 'wnsm_', necessary
39783978
# because some POSIX compliant systems require name to start with /
39793979
names = [NAME_PREFIX + name for name in names]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Make multiprocessing test case ``test_shared_memory_recreate``
2+
parallel-safe.

0 commit comments

Comments
 (0)