
    G/Phm                        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 Zej                            ed	          ej                            d
	          ej                            d e                      d                                     Zej                            e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                     t           j        dk    rqt          t           j                  } |                     d          r!t
          j                            | d          gS t
          j                            | dd          gS t           j        }t          |j
                  }t          |j                  }dd|z   d|z   dz   |z   gS )Nwin32Scriptsf2py.)sysplatformr   
executableendswithospathr   version_infostrmajorminor)exe_dirversionr   r   s       X/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/numpy/tests/test_scripts.pyfind_f2py_commandsr      s    
|w#.))I&& 	>GLL&1122GLL)V<<== "GM""GM""(<u(DEE    z Cannot test f2py command inplace)reasonzTest is unreliablef2py_cmdc                     t          j        | dg          }t          |                                t          j                            d                     d S )N-vascii)
subprocesscheck_outputr   stripnp__version__encode)r   stdouts     r   	test_f2pyr(   #   sG    
 $h%566F!6!6w!?!?@@@@@r   zCannot start subprocessc                      t          j        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'   s    r   test_pep338r*   ,   sI    $cnnd%KLLF!6!6w!?!?@@@@@r   )__doc__r   r   pytestos.pathr   pathjoinr   r   r!   numpyr$   numpy.testingr   r   __file__
is_inplacer   markskipifxfailparametrizer(   r*    r   r   <module>r8      sr    


 				  5 5 5 5 5 5 5 5 5 5         / / / / / / / /VHHWWR[11D*EEFF
F F F$ J'IJJ.//%7%7%9%9::A A ;: 0/ KJA G$=>>A A ?>A A Ar   