def analysis(self): print("Number of frame drops is {}".format(self.count_drops)) for k, v in self.frame_drops_info: print("Number of dropped frame before frame ", k, ", is :", v) test.check(self.count_drops == 0) test.finish()
depth_sensor.start(depth_frame_call_back) color_sensor.open(cp) color_sensor.start(color_frame_call_back) ############################################################################################# # Test #1 test.start("Checking for frame drops in", n_cal, "calibrations") for i in range(n_cal): try: dcs.reset_calibration() ccs.reset_calibration() d2r.trigger_device_calibration(rs.calibration_type.manual_depth_to_rgb) ac.wait_for_calibration() except: test.unexpected_exception() test.finish() ############################################################################################# # Test #2 test.start("Checking for frame drops in a failed calibration") ac.reset_status_list() try: d2r.trigger_device_calibration(rs.calibration_type.manual_depth_to_rgb) try: d2r.trigger_device_calibration(rs.calibration_type.manual_depth_to_rgb) ac.wait_for_calibration() except Exception as e: # Second trigger should throw exception test.check_exception(e, RuntimeError, "Camera Accuracy Health is already active") else: test.unexpected_exception()