o
    ig                     @   s8   d dl Z d dlmZ g dZdd Zdd Zdd	 ZdS )
    N)FontProperties)Z
get_family	get_styleget_variantZ
get_weightget_sizec                  C   s   d} t  }t|}t |}tD ]}t|| t|| ks#J | | qd} t dddd}t|}t |}tD ]}t|| t|| ksKJ | | q7d} t dd	d
dddd}t|}t |}tD ]}t|| t|| ksvJ | | qbdS )z5Test converting a FontProperties to string then back.	defaults zbasic serif   italic)familysizestylefull z
sans-serif   boldoblique
small-capsexpandedr
   r   weightr   variantZstretchN)r   strkeysgetattr)testf1sf2k r   w/var/www/html/eduruby.in/lip-sync/lip-sync-env/lib/python3.10/site-packages/matplotlib/tests/test_fontconfig_pattern.pytest_fontconfig_pattern   s,   &&&r    c                  C   s   d} d}t |}t  }tD ]}t|| t|| ks!J | | qd} d}t |}t ddddd	d
d}tD ]}t|| t|| ksJJ | | q6dS )z7Test FontProperties string conversions for correctness.r   zNsans\-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0r   zFserif-24:style=oblique:variant=small-caps:weight=bold:stretch=expandedr   r   r   r   r   r   r   N)r   r   r   )r   r   Zfontrightr   r   r   r   test_fontconfig_str1   s    &&r"   c                   C   s8   t t td W d    d S 1 sw   Y  d S )Nz:unknown)pytestZwarnsDeprecationWarningr   r   r   r   r    test_fontconfig_unknown_constantK   s   
"r%   )r#   Zmatplotlib.font_managerr   r   r    r"   r%   r   r   r   r   <module>   s    	!