o
    :a                     @   s(   d dl mZ g dZdd Zdd ZdS )    )FontProperties)Z
get_familyZ	get_styleZget_variantZ
get_weightZ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   Zitalic)familysizestylefull z
sans-serif   boldoblique
small-capsexpandedr   r   Zweightr   ZvariantZstretchN)r   strkeysgetattr)testf1sf2k r   J/usr/lib/python3/dist-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	   zKserif:size=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_str/   s    &&r   N)Zmatplotlib.font_managerr   r   r   r   r   r   r   r   <module>   s    	!