bec_widgets.utils.reference_utils ================================= .. py:module:: bec_widgets.utils.reference_utils Attributes ---------- .. autoapisummary:: bec_widgets.utils.reference_utils.REFERENCE_DIR bec_widgets.utils.reference_utils.REFERENCE_DIR_FAILURES Functions --------- .. autoapisummary:: bec_widgets.utils.reference_utils.compare_images bec_widgets.utils.reference_utils.snap_and_compare Module Contents --------------- .. py:function:: compare_images(image1_path: str, reference_image_path: str) Load two images and compare them pixel by pixel :param image1_path: The path to the first image :type image1_path: str :param reference_image_path: The path to the reference image :type reference_image_path: str :raises ValueError: If the images are different .. py:function:: snap_and_compare(widget: Any, output_directory: str, suffix: str = '') Save a rendering of a widget and compare it to a reference image :param widget: The widget to render :type widget: any :param output_directory: The directory to save the image to :type output_directory: str :param suffix: A suffix to append to the image name :type suffix: str :raises ValueError: If the images are different .. rubric:: Examples snap_and_compare(widget, tmpdir, suffix="started") .. py:data:: REFERENCE_DIR .. py:data:: REFERENCE_DIR_FAILURES