
    Icgm                        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$                  j'                  ed	      ej$                  j)                  d
	      ej$                  j+                  d e             d                      Zej$                  j'                  ed	      d        Zy)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(  rmt        t         j                        } | j	                  d      r!t
        j                  j                  | d      gS t
        j                  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       S/var/www/html/bid-api/venv/lib/python3.12/site-packages/numpy/tests/test_scripts.pyfind_f2py_commandsr      s    
||w#..)I&GGLL&122GGLL)V<== ""GMM"GMM"(<u(DEE    z Cannot test f2py command inplace)reasonzTest is unreliablef2py_cmdc                     t        j                  | dg      }t        |j                         t        j
                  j                  d             y )N-vascii)
subprocesscheck_outputr   stripnp__version__encode)r   stdouts     r   	test_f2pyr(   #   s8    
 $$h%56F!6!6w!?@r   zCannot start subprocessc                      t        j                  t        j                  ddg      } t	        | j                         t        j                  j                  d             y )Nz-mnumpy.f2pyr   r    )	r!   r"   r   r   r   r#   r$   r%   r&   )r'   s    r   test_pep338r*   ,   s<    $$cnnnd%K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      s     	  5 5   /HWR[[1D*EF
F$ J'IJ./%7%9:A ; 0 KA G$=>A ?Ar   