o
    U=ºi¯  ã                   @   sf   d dl Z d dlZd dlZddlmZ G dd„ dejƒZG dd„ dejƒZG dd	„ d	ejƒZ	d
d„ Z
dS )é    Né   )Úutilc                   @   ó.   e Zd Ze dddd¡gZejjdd„ ƒZ	dS )ÚTestIntentInOutÚtestsÚsrcÚ
regressionú	inout.f90c                 C   s`   t jdt jd�d d d… }t t| jj|¡ t jdt jd�}| j |¡ t  |g d¢¡s.J ‚d S )Né   ©Zdtypeé   é   )r   r   r   )	ÚnpÚarangeÚfloat32ÚpytestZraisesÚ
ValueErrorÚmoduleÚfooÚallclose)ÚselfÚx© r   úfC:\Users\psant\Downloads\PAF backend\school\venv\Lib\site-packages\numpy/f2py/tests/test_regression.pyÚ
test_inout   s
   zTestIntentInOut.test_inoutN)
Ú__name__Ú
__module__Ú__qualname__r   ÚgetpathÚsourcesr   ÚmarkÚslowr   r   r   r   r   r   	   ó    r   c                   @   r   )ÚTestNegativeBoundsr   r   Znegative_boundszissue_20853.f90c                 C   s^   t  d¡}d}d}dd„ }| jj|||d |||ƒ… d�}t jdt jd�}t  ||¡s-J ‚d S )	Né   iúÿÿÿé   c                 S   s   ||  d S )Nr   r   )ZxlÚxhr   r   r   Úubound$   s   z0TestNegativeBounds.test_negbound.<locals>.ubound)Úis_Zie_Zarré   r   )r   r   r   r   r   r   )r   ZxvecZxlowZxhighr'   ÚrvalZexpvalr   r   r   Útest_negbound   s   

ÿz TestNegativeBounds.test_negboundN)
r   r   r   r   r   r   r   r    r!   r+   r   r   r   r   r#      r"   r#   c                   @   r   )ÚTestNumpyVersionAttributer   r   r   r	   c                 C   s8   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   r   r   r   Útest_numpy_version_attribute1   s   z6TestNumpyVersionAttribute.test_numpy_version_attributeN)
r   r   r   r   r   r   r   r    r!   r2   r   r   r   r   r,   ,   s    r,   c                  C   s.   t j ¡ } t | ¡}dD ]}||v sJ ‚qd S )N)zfortranobject.czfortranobject.h)r   Zf2pyZget_includeÚosÚlistdir)ÚincdirZfnames_in_dirÚfnamer   r   r   Útest_include_path>   s
   

ÿr7   )r3   r   Znumpyr   Ú r   ZF2PyTestr   r#   r,   r7   r   r   r   r   Ú<module>   s    