diff --git a/pycromanager/execution_engine/device_implementations/micromanager/mm_device_implementations.py b/pycromanager/execution_engine/device_implementations/micromanager/mm_device_implementations.py index 25957b44..8d942b53 100644 --- a/pycromanager/execution_engine/device_implementations/micromanager/mm_device_implementations.py +++ b/pycromanager/execution_engine/device_implementations/micromanager/mm_device_implementations.py @@ -11,6 +11,7 @@ from typing import List, Union, Iterable + class MicroManagerDevice(Device): """ Base class for all Micro-Manager device_implementations, which enables access to their properties @@ -50,8 +51,8 @@ def __setattr__(self, name, value): if not self._core.has_property(self._device_name, name): raise AttributeError(f"Device {self._device_name} does not have property {name}") # check if read only - meta - + if self.is_property_read_only(self._device_name, name): + raise ValueError("Read only properties cannot have values set") else: # private attributes are defined in the class object.__setattr__(self, name, value) diff --git a/pycromanager/execution_engine/device_implementations/micromanager/test/__init__.py b/pycromanager/execution_engine/device_implementations/micromanager/test/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pycromanager/execution_engine/integration_tests/camera_tests.py b/pycromanager/execution_engine/device_implementations/micromanager/test/mm_camera_tests.py similarity index 86% rename from pycromanager/execution_engine/integration_tests/camera_tests.py rename to pycromanager/execution_engine/device_implementations/micromanager/test/mm_camera_tests.py index bdcbd29e..08e718ce 100644 --- a/pycromanager/execution_engine/integration_tests/camera_tests.py +++ b/pycromanager/execution_engine/device_implementations/micromanager/test/mm_camera_tests.py @@ -4,12 +4,11 @@ import itertools from pycromanager import start_headless from pycromanager.execution_engine.kernel.executor import ExecutionEngine -from pycromanager.execution_engine.devices.implementations.micromanager.mm_device_implementations import MicroManagerCamera -from pycromanager.execution_engine.implementations.events.event_implementations import (StartCapture, ReadoutImages, - StartContinuousCapture, StopCapture) from pycromanager.execution_engine.kernel.data_handler import DataHandler -from pycromanager.execution_engine.storage.NDTiffandRAM import NDRAMStorage from pycromanager.execution_engine.kernel.data_coords import DataCoordinates +from pycromanager.execution_engine.device_implementations.micromanager.mm_device_implementations import MicroManagerCamera +from pycromanager.execution_engine.storage_implementations.NDTiffandRAM import NDRAMStorage +from pycromanager.execution_engine.kernel. @pytest.fixture(scope="module") def setup_micromanager():