def test_currentRoiFps(self, qtbot):
     ccWidget = CameraControlWidget()
     ccWidget.show()
     qtbot.addWidget(ccWidget)
     cc = CameraController(ccWidget)
     cc.setupCamera("GaussianCamera")
     qtbot.mouseClick(ccWidget.startStopButton, Qt.LeftButton)
     #cc.startStopCamera(True)
     roiFps = cc.currentRoiFps()
     assert roiFps == 40
 def test_currentOffset(self, qtbot):
     ccWidget = CameraControlWidget()
     ccWidget.show()
     qtbot.addWidget(ccWidget)
     cc = CameraController(ccWidget)
     cc.setupCamera("GaussianCamera")
     cc.camera.seed = 1000
     qtbot.mouseClick(ccWidget.startStopButton, Qt.LeftButton)
     #cc.startStopCamera(True)
     offset = cc.currentOffset()
     assert offset == (264, 200)
 def test_isRoiMode(self, qtbot):
     ccWidget = CameraControlWidget()
     ccWidget.show()
     qtbot.addWidget(ccWidget)
     cc = CameraController(ccWidget)
     cc.setupCamera("GaussianCamera")
     qtbot.mouseClick(ccWidget.startStopButton, Qt.LeftButton)
     #cc.startStopCamera(True)
     isRoiMode = cc.isRoiMode()
     assert isRoiMode is False
     qtbot.mouseClick(ccWidget.acquireRoiCheckBox, Qt.LeftButton)
     isRoiMode = cc.isRoiMode()
     assert isRoiMode is True
 def test_cameraAcquireExpectedFrame(self, qtbot):
     ccWidget = CameraControlWidget()
     ccWidget.show()
     qtbot.addWidget(ccWidget)
     cc = CameraController(ccWidget)
     cc.setupCamera("GaussianCamera")
     qtbot.mouseClick(ccWidget.startStopButton, Qt.LeftButton)
     #cc.startStopCamera(True)
     frame = cc.getFrame()
     assert frame.shape == (480, 640)
     qtbot.mouseClick(ccWidget.acquireRoiCheckBox, Qt.LeftButton)
     frame = cc.getFrame()
     assert frame.shape == (50, 50)