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 22556dc
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Lib/test/_test_multiprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -4148,9 +4148,21 @@ 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:
<<<<<<< Updated upstream
shm = smm.SharedMemory(size=5, name=shm_name)
doppleganger_shm = shared_memory.SharedMemory(name=shm_name)
self.assertEqual(len(doppleganger_shm.buf), 5)
=======
<<<<<<< HEAD
shm = smm.SharedMemory(size=5, name=shm_name)
doppleganger_shm = shared_memory.SharedMemory(name=shm_name)
self.assertEqual(len(doppleganger_shm.buf), 5)
=======
shm = smm.SharedMemory(size=32, name=shm_name)
doppleganger_shm = shared_memory.SharedMemory(name=shm_name)
self.assertGreaterEqual(len(doppleganger_shm.buf), 32)
>>>>>>> a7b51b1c1e (gh-101014: support named SharedMemory and ShareableList in SharedMemoryManager)
>>>>>>> Stashed changes
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 22556dc

Please sign in to comment.