a
    ³ÐOcm  ã                   @   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   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   úW/var/www/html/gsl.tools/lib/python3.9/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  ||¡sZJ ‚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!      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J ‚t| jjtƒs"J ‚tj| jjks4J ‚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    r0   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    

r5   )r1   r   Únumpyr   Ú r   ZF2PyTestr   r!   r*   r5   r   r   r   r   Ú<module>   s   