§
    ‡Ûg¼  ã                   ó’   — d dl mZ d dlZd dlZd dlmZ d dlmZ d dlmZ ej	         
                    dg d¢¦  «        d„ ¦   «         ZdS )	é    )ÚPathN)Úapprox)Úcompare_images)Ú_image_directorieszim1, im2, tol, expect_rms))úbasn3p02.pngúbasn3p02-minorchange.pngé
   N)r   r   r   g»íBs�@)r   zbasn3p02-1px-offset.pngr   g%Ì´ý‰V@)r   zbasn3p02-half-1px-offset.pngr   g     àO@)r   zbasn3p02-scrambled.pngr   g‘D/£X”e@)ú
all127.pngú
all128.pngr   é   )r   r
   r   r   c                 ó4  — |                      |¦  «         t          t          t          d„ ¦  «        ¦  «        \  }}|| z  }t	          j        ||z  |¦  «         t          || z  ||d¬¦  «        }	|€|	�J ‚dS |	€J ‚|	d         t          |d¬¦  «        k    sJ ‚dS )a   
    Compare two images, expecting a particular RMS error.

    im1 and im2 are filenames relative to the baseline_dir directory.

    tol is the tolerance to pass to compare_images.

    expect_rms is the expected RMS value, or None. If None, the test will
    succeed if compare_images succeeds. Otherwise, the test will succeed if
    compare_images fails and returns an RMS error almost equal to this value.
    c                  ó   — dS )NÚdummy© r   ó    úZ/granary/edev/quantum/lib/python3.11/site-packages/matplotlib/tests/test_compare_images.pyú<lambda>z2test_image_comparison_expect_rms.<locals>.<lambda>=   s   € ÀG€ r   T)ÚtolÚin_decoratorNÚrmsg-Cëâ6?)Úabs)ÚchdirÚmapr   r   ÚshutilÚcopyfiler   r   )
Úim1Úim2r   Ú
expect_rmsÚtmp_pathÚmonkeypatchÚbaseline_dirÚ
result_dirÚ
result_im2Úresultss
             r   Ú test_image_comparison_expect_rmsr%      sÉ   € ð` ×Ò�hÑÔÐÝ"¥4Õ);¸O¸OÑ)LÔ)LÑMÔMÑ€L�*ð ˜cÑ!€JÝ
„O�L 3Ñ&¨
Ñ3Ô3Ð3ÝØ�sÑ˜J¨C¸dðDñ Dô D€Gð ÐØˆˆˆˆˆàÐ"Ð"Ð"Ø�uŒ~¥¨
¸Ð!=Ñ!=Ô!=Ò=Ð=Ð=Ð=Ð=Ð=r   )Úpathlibr   r   Úpytestr   Úmatplotlib.testing.comparer   Úmatplotlib.testing.decoratorsr   ÚmarkÚparametrizer%   r   r   r   ú<module>r,      s®   ðØ Ð Ð Ð Ð Ð Ø €€€à €€€Ø Ð Ð Ð Ð Ð à 5Ð 5Ð 5Ð 5Ð 5Ð 5Ø <Ð <Ð <Ð <Ð <Ð <ð „×ÒØðð ð ñ ô  ðB>ð >ñC ô  ðB>ð >ð >r   