
    cY
                         d Z ddlZddlZddlZddlZddlZddlmZ ddlZ	d Z
d Zej                            ej        dk    d          d	             Zed
k    r ej                     dS dS )z
Tests for QtAwesome.
    N)
IconicFontc                  \    t          j        t          j        dz   d          } | dk    sJ d S )Nz) -c "import qtawesome ; qtawesome.icon()"T)shellr   )
subprocesscallsys
executable)output_numbers    >lib/python3.11/site-packages/qtawesome/tests/test_qtawesome.pytest_segfault_importr      sC    OCN 6: %:AEG G GMA    c                     t          j                    }t          |t                    sJ |j                                        }|sJ d t          j        |                                          D             }|rJ dS )a"  
    Test that each font used by qtawesome has a unique name. If this test
    fails, this probably means that you need to rename the family name of
    some fonts. Please see PR #98 for more details on why it is necessary and
    on how to do this.

    Regression test for Issue #107
    c                 $    g | ]\  }}|d k    |S )    ).0fontnamecounts      r   
<listcomp>z0test_unique_font_family_name.<locals>.<listcomp>)   s;     G G Gx<AAIG( G G Gr   N)	qta	_instance
isinstancer   r   valuescollectionsCounteritems)qtbotresource	fontnames
duplicatess       r   test_unique_font_family_namer!      s     }Hh
+++++ !((**IG G%i006688G G GJr   ntzOnly meant for Windows)reasonc                      t          j                     g d} ddg}t          j        |ddd          j        }| D ]\  }}||v sJ ||v sJ dS )z
    Test that the bundled fonts are being installed on Windows.
    
    See spyder-ide/qtawesome#167 and spyder-ide/spyder#18642
    )
)codiconzcodicon.ttf)zelusiveicons-webfontzelusiveicons-webfont.ttf)zfontawesome4.7-webfontzfontawesome4.7-webfont.ttf)zfontawesome5-brands-webfontzfontawesome5-brands-webfont.ttf)zfontawesome5-regular-webfontz fontawesome5-regular-webfont.ttf)zfontawesome5-solid-webfontzfontawesome5-solid-webfont.ttf)zmaterialdesignicons5-webfontz materialdesignicons5-webfont.ttf)zmaterialdesignicons6-webfont z materialdesignicons6-webfont.ttf)phosphorzphosphor.ttf)	remixiconzremixicon.ttfzpowershell.exezKGet-ItemProperty "HKCU:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts"T)capture_outputchecktextN)r   r   r   runstdout)fonts_expectedfonts_commandfonts_result	font_namefont_filenames        r   test_bundled_font_installationr2   .   s     MOOO  N 	VM >-DW[\\\cL$2 - - 	=L((((,,,,,- -r   __main__)__doc__r   osr   r   pytestqtawesome.iconic_fontr   	qtawesomer   r   r!   markskipifnamer2   __name__mainr   r   r   <module>r>      s         				     



  - , , , , ,        , BGtO,DEE- - FE-< z FKMMMMM r   