def test_constructor_open_or_create(): shared_memory_object(open_or_create, 'MySharedMemory', modes.read_write) shared_memory_object(open_or_create, 'MySharedMemory', modes.read_write)
def test_remove(): shared_memory_object(open_or_create, 'MySharedMemory', modes.read_write) assert shared_memory_object.remove('MySharedMemory')
def test_constructor_create_only(): shared_memory_object(create_only, 'MySharedMemory', modes.read_write) with pytest.raises(RuntimeError): shared_memory_object(create_only, 'MySharedMemory', modes.read_write)
def test_constructor_different_modes(mode): shared_memory_object(open_or_create, 'MySharedMemory', mode)