ó
    [h¼  ã                   óŒ   • S SK Jr  S SKrS SKrS SKJr  S SKJr  S SKJr  \R                  R                  S/ SQ5      S 5       rg)	é    )Ú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                 óô   • UR                  U5        [        [        [        S 5      5      u  pgXp-  n[        R
                  " Xa-  U5        [        X`-  X‚SS9n	Uc  U	b   egU	c   eU	S   [        USS9:X  d   eg)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                  ó   • g)NÚdummy© r   ó    Ús/home/gothic/public_html/Fooocus/fooocus_env/lib64/python3.13/site-packages/matplotlib/tests/test_compare_images.pyÚ<lambda>Ú2test_image_comparison_expect_rms.<locals>.<lambda>=   s   € ÀGr   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Ó)LÓMÑ€Lð Ñ!€JÜ
‡O‚O�LÑ&¨
Ô3ÜØÑ˜J¸dñD€Gð ÑØ‰Ð‰àÑ"Ð"Ð"Ø�u‰~¤¨
¸Ñ!=Ó=Ð=Ñ=r   )Úpathlibr   r   Úpytestr   Úmatplotlib.testing.comparer   Úmatplotlib.testing.decoratorsr   ÚmarkÚparametrizer&   r   r   r   Ú<module>r-      sE   ðÝ Û ã Ý å 5Ý <ð ‡�×ÑØòó ñB>óC ñB>r   