Skip to content

Commit

Permalink
pythongh-101014: support named SharedMemory and ShareableList in Shar…
Browse files Browse the repository at this point in the history
…edMemoryManager
  • Loading branch information
knwng committed Feb 23, 2023
1 parent b8c6356 commit 9e9077b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Lib/test/_test_multiprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -4148,9 +4148,9 @@ def test_shared_memory_SharedMemoryManager_named_objects(self):
shm_name = 'test_named_shared_memory'
sl_name = 'test_named_sharable_list'
with multiprocessing.managers.SharedMemoryManager() as smm:
shm = smm.SharedMemory(size=5, name=shm_name)
shm = smm.SharedMemory(size=32, name=shm_name)
doppleganger_shm = shared_memory.SharedMemory(name=shm_name)
self.assertEqual(len(doppleganger_shm.buf), 5)
self.assertGreaterEqual(len(doppleganger_shm.buf), 32)
sl = smm.ShareableList(range(5), name=sl_name)
doppleganger_sl = shared_memory.ShareableList(name=sl_name)
self.assertEqual(len(doppleganger_sl), 5)
Expand Down

0 comments on commit 9e9077b

Please sign in to comment.