o
    Ô­jm  ã                   @   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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ejjedd
�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_equalÚIS_WASMz..zsetup.pyc                  C   st   t jdkr tt jƒ} |  d¡rtj | d¡gS tj | dd¡gS t j}t	|j
ƒ}t	|jƒ}dd| d| d | gS )NÚwin32ÚScriptsÚf2pyÚ.)ÚsysÚplatformr   Ú
executableÚendswithÚosÚpathr   Úversion_infoÚstrÚmajorÚminor)Úexe_dirÚversionr   r   © r   úU/var/www/html/CropPilot/venv/lib/python3.10/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%   zCannot start subprocessc                  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   ÚpytestÚos.pathr   Úpathjoinr   r   r   Únumpyr!   Únumpy.testingr   r   Ú__file__Ú
is_inplacer   ÚmarkÚskipifÚxfailÚparametrizer%   r&   r   r   r   r   Ú<module>   s     