Ë
    íÍ:jø  ã                   ón   — d dl mZ d dlmZ d dlZd dlmZ d dlmZm	Z
  edgd¬«      d	„ «       Zd
„ Zd„ Zy)é    )ÚBytesIO)ÚPathN)Úimage_comparison)ÚcmÚpyplotzpngsuite.pngÚdefault)Ústylec                  ó4  — t        t        t        «      j                  dz  j	                  d«      «      } t        j                  t        | «      df¬«       t        | «      D ][  \  }}t        j                  |«      }d }|j                  dk(  rt        j                  }t        j                  |||dz   ddf|d¬«       Œ] t        j                  «       j                  j!                  d	«       t        j                  «       j#                  dt        | «      «       y )
Nzbaseline_images/pngsuitez	basn*.pngé   )Úfigsizeé   r   Únearest)ÚextentÚcmapÚinterpolationz#ddffff)Úsortedr   Ú__file__ÚparentÚglobÚpltÚfigureÚlenÚ	enumerateÚimreadÚndimr   ÚgrayÚimshowÚgcaÚpatchÚset_facecolorÚset_xlim)ÚfilesÚiÚfnameÚdatar   s        ún/home/mcse/projects/srt_converter/srt-converter-venv/lib/python3.12/site-packages/matplotlib/tests/test_png.pyÚtest_pngsuiter'   
   sÕ   € äÜ	Œh‹×	Ñ	Ð!;Ñ	;×AÑAÀ+ÓNóP€Eô ‡J�Jœ˜E›
 A�Õ'ä˜eÓ$ò V‰ˆˆ5Ü�z‰z˜%Ó ˆØˆØ�9‰9˜Š>ä—7‘7ˆDÜ�
‰
�4  A¨¡E¨1¨aÐ 0°tÈ9ÖUðVô ‡G�GƒI‡O�O×!Ñ! )Ô,Ü‡G�GƒI×Ñ�qœ#˜e›*Õ%ó    c                 ó”  — | dz  }| dz  }t        j                  |«       t        |d«      5 }|j                  «       }d d d «       t        |d«      5 }|j	                  d d «       d d d «       t        j                  t        «      5  t        j                  |«       d d d «       y # 1 sw Y   ŒjxY w# 1 sw Y   ŒMxY w# 1 sw Y   y xY w)Nztest.pngztest_truncated.pngÚrbÚwbé   )	r   ÚsavefigÚopenÚreadÚwriteÚpytestÚraisesÚ	Exceptionr   )Útmp_pathÚpathÚpath_tÚfinÚbufÚfouts         r&   Útest_truncated_filer:      s¶   € Ø�jÑ €DØÐ,Ñ,€FÜ‡K�K�ÔÜ	ˆd�DÓ	ð ˜SØ�h‰h‹jˆ÷ä	ˆf�dÓ	ð ˜tØ�
‰
�3�s˜�8Ô÷ô 
�‰”yÓ	!ñ Ü�
‰
�6Ô÷ð ÷ð ú÷ð ú÷ð ús#   ¬B&ÁB2ÂB>Â&B/Â2B;Â>Cc                  ó@  — t        «       } t        j                  | «       | j                  d«       t        | j	                  d«      «      }|j                  d«       t        j                  t        «      5  t        j                  |«       d d d «       y # 1 sw Y   y xY w)Nr   r,   )	r   r   r-   Úseekr/   r1   r2   r3   r   )ÚbÚb2s     r&   Útest_truncated_bufferr?   *   sh   € Ü‹	€AÜ‡K�K�„NØ‡F�Fˆ1„IÜ	�—‘˜“Ó	€BØ‡G�GˆA„Jä	�‰”yÓ	!ñ Ü�
‰
�2Œ÷÷ ñ ús   Á5BÂB)Úior   Úpathlibr   r1   Úmatplotlib.testing.decoratorsr   Ú
matplotlibr   r   r   r'   r:   r?   © r(   r&   ú<module>rE      s<   ðÝ Ý ã å :ß (ñ �>Ð"¨)Ô4ñ&ó 5ð&ò$
ór(   