def test_capture(self):
    self.mock_device.RetrieveResult = MagicMock(side_effect=[MockGrab([[0, 12], [3, 100]]), MockGrab([[9, 8], [31, 5]])])
    self.mock_stage.is_moving = MagicMock(side_effect=[True, True, False])
    data = self.cam.capture(self.mock_stage, [0, 100])
    target = np.array([[[12, 100], [0, 3]], [[8, 5], [9, 31]]])
    np.testing.assert_array_equal(data, target)
def test_capture(self):
    self.mock_device.RetrieveResult = MagicMock(side_effect=[MockGrab([[0, 12], [3, 100]]), MockGrab([[9, 8], [31, 5]])])
    self.mock_stage.is_moving = MagicMock(side_effect=[True, True, False])
    data = self.cam.capture(self.mock_stage, [0, 100])
    target = np.array([[[12, 100], [0, 3]], [[8, 5], [9, 31]]])
    np.testing.assert_array_equal(data, target)