diff --git a/conda/camera/meta.yaml b/conda/camera/meta.yaml index 3dfd0cf53e5629fbff53ba7184f3515029084422..46d35c30585de89d05a2c1f0a896152d0feda697 100644 --- a/conda/camera/meta.yaml +++ b/conda/camera/meta.yaml @@ -34,14 +34,10 @@ requirements: - pvcam-sdk test: - source_files: - - test requires: - - pytest + - pvcam-runtime imports: - Lima.Iris - commands: - - pytest test about: home: https://github.com/esrf-bliss/Lima diff --git a/test/test_api.py b/test/test_api.py deleted file mode 100644 index 180f8c44319e56fbdc7b10131842c411e8c6f11d..0000000000000000000000000000000000000000 --- a/test/test_api.py +++ /dev/null @@ -1,83 +0,0 @@ -""" -This file can be used with `pytest`. - -The following way to execute the whole tests. -``` -pytest test/test.py -``` - -Or the following way to execute a single test. -``` -pytest test/test.py::test_internal_trigger -``` - -""" - -import time -import logging -from Lima import Core, Iris - - -_logger = logging.getLogger(__name__) - - -class AcquisitionStatusFromImageStatusCallback(Core.CtControl.ImageStatusCallback): - def __init__(self): - super().__init__() - self.last_base_image_ready = -1 - self.last_image_acquired = -1 - self.last_image_ready = -1 - self.last_image_saved = -1 - self.last_counter_ready = -1 - - def imageStatusChanged(self, image_status): - self.last_base_image_ready = image_status.LastBaseImageReady - self.last_image_acquired = image_status.LastImageAcquired - self.last_image_ready = image_status.LastImageReady - self.last_image_saved = image_status.LastImageSaved - self.last_counter_ready = image_status.LastCounterReady - - -def test_internal_trigger(): - cam = Iris.Camera() - hw = Iris.Interface(cam) - ct = Core.CtControl(hw) - -# acq_status = AcquisitionStatusFromImageStatusCallback() -# ct.registerImageStatusCallback(acq_status) - -# ct.prepareAcq() -# ct.startAcq() - -# while ct.getStatus().AcquisitionStatus != Core.AcqReady: -# time.sleep(0.1) - -# assert acq_status.last_image_ready == 0 - assert True - - -#def test_internal_trigger_multi(): -# cam = Iris.Camera() -# hw = Iris.Interface(cam) -# ct = Core.CtControl(hw) - -# acq_status = AcquisitionStatusFromImageStatusCallback() -# ct.registerImageStatusCallback(acq_status) - -# acq = ct.acquisition() -# acq.setTriggerMode(Core.IntTrigMult) -# acq.setAcqNbFrames(3) -# acq.setAcqExpoTime(0.01) - -# ct.prepareAcq() -# for _ in range(3): -# time.sleep(0.1) -# ct.startAcq() -# # Make sure the detector is ready for next image -# while hw.getStatus().acq != Core.AcqReady: -# time.sleep(0.1) - -# while ct.getStatus().AcquisitionStatus != Core.AcqReady: -# time.sleep(0.1) - -# assert acq_status.last_image_ready == 2