
    G/Ph                        d dl Z d dlZd dlZd dlZd dlmZ ddlm	Z	  G d de	j
                  Z G d de	j
                  Z G d d	e	j
                  Zd
 Z G d de	j
                  Z G d de	j
                  Z G d de	j
                  Zej        j        d             Zej        j        ej                             ej                    dvd          d                         ZdS )    N   )utilc                   `    e Zd Z ej        dddd          gZej        j        d             Z	dS )TestIntentInOuttestssrc
regression	inout.f90c                 H   t          j        dt           j                  d d d         }t          j        t
          | j        j        |           t          j        dt           j                  }| j                            |           t          j        |g d          sJ d S )N   dtype      )r   r   r   )	nparangefloat32pytestraises
ValueErrormodulefooallclose)selfxs     `/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/numpy/f2py/tests/test_regression.py
test_inoutzTestIntentInOut.test_inout   s     Iarz***33Q3/j$+/1555 Iarz***{1iii(((((((    N)
__name__
__module____qualname__r   getpathsourcesr   markslowr    r   r   r   r      sM        t|GUL+FFGG[) ) ) ) )r   r   c                   `    e Zd Z ej        dddd          gZej        j        d             Z	dS )TestNegativeBoundsr   r   negative_boundszissue_20853.f90c           
         t          j        d          }d}d}d }| j                            |||d  |||                             }t          j        dt           j                  }t          j        ||          sJ d S )N   i   c                     || z
  dz   S )Nr   r&   )xlxhs     r   uboundz0TestNegativeBounds.test_negbound.<locals>.ubound&   s    7Q;r   )is_ie_arr   r   )r   r   r   r   r   r   )r   xvecxlowxhighr0   rvalexpvals          r   test_negboundz TestNegativeBounds.test_negbound   s    y}}	 	 	{4U !5&&u"5"5!56  8 82rz222{4(((((((r   N)
r   r    r!   r   r"   r#   r   r$   r%   r:   r&   r   r   r(   r(      sO        t|GU,=?PQQRG[) ) ) ) )r   r(   c                   `    e Zd Z ej        dddd          gZej        j        d             Z	dS )TestNumpyVersionAttributer   r   r	   r
   c                     t          | j        d          sJ t          | j        j        t                    sJ t
          j        | j        j        k    sJ d S )N__f2py_numpy_version__)hasattrr   
isinstancer>   strr   __version__)r   s    r   test_numpy_version_attributez6TestNumpyVersionAttribute.test_numpy_version_attribute3   sZ     t{$<===== $+<cBBBBB ~!CCCCCCCr   N)
r   r    r!   r   r"   r#   r   r$   r%   rC   r&   r   r   r<   r<   .   sT         t|GUL+FFGG[	D 	D 	D 	D 	Dr   r<   c                      t           j                                        } t          j        |           }dD ]}||v sJ 	d S )N)zfortranobject.czfortranobject.h)r   f2pyget_includeoslistdir)incdirfnames_in_dirfnames      r   test_include_pathrL   @   sQ    W  ""FJv&&M7 & &%%%%%& &r   c                       e Zd Z ej        dddd          gZd ej        ddd           d ej        ddd           gZej        j	        d             Z
dS )	TestIncludeFilesr   r   r	   zincfile.f90z-Iz--include-paths c                 P    d}| j                             dd          }||k    sJ d S )Ng      @g      @g      @)r   add)r   express      r   test_gh25344zTestIncludeFiles.test_gh25344L   s-    kooc3''s





r   N)r   r    r!   r   r"   r#   optionsr   r$   r%   rS   r&   r   r   rN   rN   G   s        t|GUL-HHIG@LDL%>>@@N,$,w|"L"LNNPG [    r   rN   c                       e Zd Z ej        dddd          gZej        j        d             Z	ej        j        d             Z
dS )TestF77Commentsr   r   r	   zf77comments.fc                     t          j        dt           j                  }t          j        dt           j                  }| j                            ||          }|d         dk    sJ |d         dk    sJ d S Nr   r      r      r      r   arrayint32r   testsubr   x1x2rR   s       r   test_gh26148zTestF77Comments.test_gh26148V   k    Xarx(((Xarx(((KB''1v{{{{1v||||||r   c                     t          j        ddt           j                  dz  }| j                                        }t          j        ||           d S )Nr   r4   r   r   )r   r   r   r   testsub2nptassert_allclose)r   expectedrR   s      r   test_gh26466zTestF77Comments.test_gh26466^   sM     9Q"*555a7K  ""Hc*****r   N)r   r    r!   r   r"   r#   r   r$   r%   rc   rj   r&   r   r   rV   rV   R   sn        t|GUL/JJKG[   [+ + + + +r   rV   c                   `    e Zd Z ej        dddd          gZej        j        d             Z	dS )TestF90Contiuationr   r   r	   f90continuation.f90c                     t          j        dt           j                  }t          j        dt           j                  }| j                            ||          }|d         dk    sJ |d         dk    sJ d S rX   r\   r`   s       r   test_gh26148bz TestF90Contiuation.test_gh26148bi   rd   r   N)
r   r    r!   r   r"   r#   r   r$   r%   ro   r&   r   r   rl   rl   e   sN        t|GUL:OPPQG[    r   rl   c                      	 t          j        t          j        dddd          gdgd          } d S # t          $ r}dt	          |          vsJ Y d }~d S d }~ww xY w)	Nr   r   r	   rm   z	-lfoo.barBlah)module_namezlparen got assign)r   build_moduler"   RuntimeErrorrA   aarerrs     r   test_gh26623rx   q   s    4\'5,8MNNOM
 
 

  4 4 4"#d))33333333334s   .2 
AAA)LinuxDarwinz$Unsupported on this platform for now)reasonc                      	 t          j        t          j        dddd          gddgd          } d S # t          $ r}d	t	          |          v sJ Y d }~d S d }~ww xY w)
Nr   r   r	   zf77fixedform.f95z--f77flags='-ffixed-form -O2'z--f90flags="-ffixed-form -Og"rq   )rT   rr   unknown_subroutine_)r   rs   r"   ImportErrorrA   ru   s     r   test_gh25784r   ~   s    2\'5,8JKKL 01
 
 
 
  2 2 2$D		11111111112s   /3 
AAA)rG   r   platformnumpyr   numpy.testingtestingrg    r   F2PyTestr   r(   r<   rL   rN   rV   rl   r$   r%   rx   skipifsystemr   r&   r   r   <module>r      s   				                  ) ) ) ) )dm ) ) ) ) ) ) ) ) ) ) )&D D D D D D D D$& & &	 	 	 	 	t} 	 	 	+ + + + +dm + + +&
 
 
 
 
 
 
 
 	4 	4 	4 OHO%%-@@Iopp2 2 qp 2 2 2r   