U
    ÉZjm  ã                   @   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                   @   s.   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   sb   t jdt jd�d d d… }t t| jj|¡ t jdt jd�}| j |¡ t  |dddg¡s^t	‚d S )Né   ©Zdtypeé   é   r   )
ÚnpÚarangeÚfloat32ÚpytestZraisesÚ
ValueErrorÚmoduleÚfooÚallcloseÚAssertionError)ÚselfÚx© r   úc/var/www/html/TRUCKING_PROJECT/venv/lib/python3.8/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   	   s   r   c                   @   s.   e Zd Ze dddd¡gZejjdd„ ƒZ	dS )Ú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  ||¡sZt‚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   )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"      s   r"   c                   @   s.   e Zd Ze dddd¡gZejjdd„ ƒZ	dS )ÚTestNumpyVersionAttributer   r   r   r   c                 C   s8   t | jdƒst‚t| jjtƒs"t‚tj| jjks4t‚d S )NÚ__f2py_numpy_version__)Úhasattrr   r   Ú
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!   r1   r   r   r   r   r+   ,   s   r+   c                  C   s.   t j ¡ } t | ¡}dD ]}||kst‚qd S )N)zfortranobject.czfortranobject.h)r   Zf2pyZget_includeÚosÚlistdirr   )ÚincdirZfnames_in_dirÚfnamer   r   r   Útest_include_path>   s    

r6   )r2   r   Únumpyr   Ú r   ZF2PyTestr   r"   r+   r6   r   r   r   r   Ú<module>   s   