a
    hÝEb%  ã                   @   s¬   d Z ddlZddlZddlZddlmZmZmZ ddl	Z	ddl
ZddlmZ eeeejƒddƒƒZdd„ Zejjed	d
�ejjdd
�ej deƒ ¡dd„ ƒƒƒZdd„ ZdS )z\ Test scripts

Test that we can run executable scripts that have been installed with numpy.
é    N)ÚjoinÚisfileÚdirname)Úassert_equalz..zsetup.pyc                  C   sz   t jdkrBtt jƒ} |  d¡r.tj | d¡gS tj | dd¡gS n4t j}t	|j
ƒ}t	|jƒ}dd| d| d | gS d S )NÚwin32ÚScriptsZf2pyÚ.)ÚsysÚplatformr   Ú
executableÚendswithÚosÚpathr   Úversion_infoÚstrÚmajorÚminor)Úexe_dirÚversionr   r   © r   úX/home/ja/django-apps/lartica_env/lib/python3.9/site-packages/numpy/tests/test_scripts.pyÚfind_f2py_commands   s    




r   z Cannot test f2py command inplace)ÚreasonzTest is unreliableÚf2py_cmdc                 C   s(   t  | dg¡}t| ¡ tj d¡ƒ d S )Nú-vÚascii)Ú
subprocessÚcheck_outputr   ÚstripÚnpÚ__version__Úencode)r   Ústdoutr   r   r   Ú	test_f2py#   s    r#   c                  C   s,   t  tjddg¡} t|  ¡ tj d¡ƒ d S )Nz-mnumpy.f2pyr   r   )	r   r   r	   r   r   r   r   r    r!   )r"   r   r   r   Útest_pep338,   s    r$   )Ú__doc__r	   r   ZpytestÚos.pathr   Zpathjoinr   r   r   Únumpyr   Znumpy.testingr   Ú__file__Z
is_inplacer   ÚmarkZskipifZxfailZparametrizer#   r$   r   r   r   r   Ú<module>   s   