From 22556dc49db03647735faaef75ed177a6d19b147 Mon Sep 17 00:00:00 2001 From: Edwin Wang Date: Thu, 23 Feb 2023 07:33:49 +0000 Subject: [PATCH] gh-101014: support named SharedMemory and ShareableList in SharedMemoryManager --- Lib/test/_test_multiprocessing.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py index e02a6209bee8d28..39f3b9152ea4b54 100644 --- a/Lib/test/_test_multiprocessing.py +++ b/Lib/test/_test_multiprocessing.py @@ -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)