o
    Ô­jä	  ã                   @   sx   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
G dd„ dejƒ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é   ©Údtypeé   é   )r   r   r   )	ÚnpÚarangeÚfloat32ÚpytestÚraisesÚ
ValueErrorÚmoduleÚfooÚallclose)ÚselfÚx© r   ú]/var/www/html/CropPilot/venv/lib/python3.10/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   Ú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   )ÚxlÚxhr   r   r   Úubound$   s   z0TestNegativeBounds.test_negbound.<locals>.ubound)Úis_Úie_Úarré   r   )r   r   r   r   r   r   )r   ÚxvecÚxlowÚxhighr+   ÚrvalÚexpvalr   r   r   Útest_negbound   s   

ÿz TestNegativeBounds.test_negboundN)
r   r   r   r   r    r!   r   r"   r#   r5   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   Ú
isinstancer7   Ú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#   r=   r   r   r   r   r6   ,   s    r6   c                  C   s.   t j ¡ } t | ¡}dD ]}||v sJ ‚qd S )N)zfortranobject.czfortranobject.h)r   Úf2pyÚget_includeÚosÚlistdir)ÚincdirÚfnames_in_dirÚfnamer   r   r   Útest_include_path>   s
   

ÿrE   c                   @   sD   e Zd ZdZe ddddd¡e ddddd¡gZejj	dd	„ ƒZ
d
S )ÚTestModuleAndSubroutineÚexampler   r   r   Úgh25337zdata.f90zuse_data.f90c                 C   s$   | j j d¡ dt| j ƒv sJ ‚d S )Nr   Údata)r   rI   Ú	set_shiftÚdirr<   r   r   r   Útest_gh25337J   s   z$TestModuleAndSubroutine.test_gh25337N)r   r   r   Úmodule_namer   r    r!   r   r"   r#   rL   r   r   r   r   rF   E   s    ÿrF   )r@   r   Únumpyr   Ú r   ÚF2PyTestr   r%   r6   rE   rF   r   r   r   r   Ú<module>   s    