diff --git a/ophyd_devices/epics/devices/eiger9m_csaxs.py b/ophyd_devices/epics/devices/eiger9m_csaxs.py index 9c11a15..de7d3b3 100644 --- a/ophyd_devices/epics/devices/eiger9m_csaxs.py +++ b/ophyd_devices/epics/devices/eiger9m_csaxs.py @@ -398,31 +398,6 @@ class Eiger9McSAXS(PSIDetectorBase): cam = ADCpt(SLSDetectorCam, "cam1:") MIN_READOUT = 3e-3 - def __init__( - self, - prefix="", - *, - name, - kind=None, - read_attrs=None, - configuration_attrs=None, - parent=None, - device_manager=None, - sim_mode=False, - **kwargs, - ): - super().__init__( - prefix, - name=name, - kind=kind, - read_attrs=read_attrs, - configuration_attrs=configuration_attrs, - parent=parent, - device_manager=device_manager, - sim_mode=sim_mode, - **kwargs, - ) - def set_trigger(self, trigger_source: TriggerSource) -> None: """Set trigger source for the detector. Check the TriggerSource enum for possible values diff --git a/tests/test_eiger9m_csaxs.py b/tests/test_eiger9m_csaxs.py index 0dc53e9..a461582 100644 --- a/tests/test_eiger9m_csaxs.py +++ b/tests/test_eiger9m_csaxs.py @@ -29,9 +29,9 @@ def mock_det(): with mock.patch.object(dm, "producer"): with mock.patch( "ophyd_devices.epics.devices.psi_detector_base.FileWriterMixin" - ) as filemixin, mock.patch( + ), mock.patch( "ophyd_devices.epics.devices.psi_detector_base.PSIDetectorBase._update_service_config" - ) as mock_service_config: + ): with mock.patch.object(ophyd, "cl") as mock_cl: mock_cl.get_pv = MockPV mock_cl.thread_class = threading.Thread @@ -52,9 +52,9 @@ def test_init(): with mock.patch.object(dm, "producer"): with mock.patch( "ophyd_devices.epics.devices.psi_detector_base.FileWriterMixin" - ) as filemixin, mock.patch( + ), mock.patch( "ophyd_devices.epics.devices.psi_detector_base.PSIDetectorBase._update_service_config" - ) as mock_service_config: + ): with mock.patch.object(ophyd, "cl") as mock_cl: mock_cl.get_pv = MockPV with mock.patch( @@ -396,12 +396,12 @@ def test_unstage( mock_det._stopped = stopped if expected_exception: mock_det.unstage() - assert mock_det._stopped == True + assert mock_det._stopped is True else: mock_det.unstage() mock_finished.assert_called_once() mock_publish_file_location.assert_called_with(done=True, successful=True) - assert mock_det._stopped == False + assert mock_det._stopped is False def test_stop_detector_backend(mock_det): @@ -456,7 +456,7 @@ def test_stop(mock_det): mock_det.stop() mock_stop_det.assert_called_once() mock_stop_detector_backend.assert_called_once() - assert mock_det._stopped == True + assert mock_det._stopped is True @pytest.mark.parametrize( @@ -520,13 +520,13 @@ def test_finished(mock_det, stopped, cam_state, daq_status, scaninfo, expected_e with pytest.raises(Exception): mock_det.timeout = 0.1 mock_det.custom_prepare.finished() - assert mock_det._stopped == stopped + assert mock_det._stopped is stopped mock_stop_backend.assert_called() mock_stop_det.assert_called_once() else: mock_det.custom_prepare.finished() if stopped: - assert mock_det._stopped == stopped + assert mock_det._stopped is stopped mock_stop_backend.assert_called() mock_stop_det.assert_called_once()