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)
 def test_cameraAcquireRejectedFrame(self, qtbot, mocker):
     ccWidget = CameraControlWidget()
     ccWidget.show()
     qtbot.addWidget(ccWidget)
     cc = CameraController(ccWidget)
     cc.setupCamera("GaussianCamera")
     cc.camera.getFullFrame = mocker.Mock(side_effect=FrameRejected)
     qtbot.mouseClick(ccWidget.startStopButton, Qt.LeftButton)
     qtbot.mouseClick(ccWidget.acquireFramesButton, Qt.LeftButton)
     frame = cc.getFrame()
     assert frame is None
     qtbot.mouseClick(ccWidget.acquireFramesButton, Qt.LeftButton)