U
    ÉZje  ã                   @   s:   d dl Z d dlZd dlZddlmZ G dd„ dejƒZdS )é    Né   )Úutilc                
   @   sæ   e Zd Ze dddd¡e dddd¡e dddd¡e dddd¡e dddd¡gZejjd	d
„ ƒZ	ejjdd„ ƒZ
ejjdd„ ƒZejjdd„ ƒZejjdd„ ƒZejjdd„ ƒZejjdd„ ƒZejjdd„ ƒZejjdd„ ƒZdS )ÚTestParametersZtestsÚsrcZ	parameterzconstant_real.f90zconstant_integer.f90zconstant_both.f90zconstant_compound.f90zconstant_non_compound.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ÚarangeZfloat32ÚpytestÚraisesÚ
ValueErrorÚmoduleZ
foo_singleÚallcloseÚAssertionError©ÚselfÚx© r   úb/var/www/html/TRUCKING_PROJECT/venv/lib/python3.8/site-packages/numpy/f2py/tests/test_parameter.pyÚtest_constant_real_single   s
    z(TestParameters.test_constant_real_singlec                 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 r   )
r   r   Úfloat64r   r   r   r   Z
foo_doubler   r   r   r   r   r   Útest_constant_real_double   s
    z(TestParameters.test_constant_real_doublec                 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 )Nr   r   r	   r
   é   r   )
r   r   Úint32r   r   r   r   Zfoo_compound_intr   r   r   r   r   r   Útest_constant_compound_int)   s
    z)TestParameters.test_constant_compound_intc                 C   s8   t jdt jd�}| j |¡ t  |ddddg¡s4t‚d S )Né   r   é   r   r	   r
   )r   r   r   r   Zfoo_non_compound_intr   r   r   r   r   r   Útest_constant_non_compound_int4   s    z-TestParameters.test_constant_non_compound_intc                 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 r   )
r   r   r   r   r   r   r   Zfoo_intr   r   r   r   r   r   Útest_constant_integer_int;   s
    z(TestParameters.test_constant_integer_intc                 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 r   )
r   r   Zint64r   r   r   r   Zfoo_longr   r   r   r   r   r   Útest_constant_integer_longF   s
    z)TestParameters.test_constant_integer_longc                 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 ©Nr   r   r	   r
   é   )
r   r   r   r   r   r   r   Zfoor   r   r   r   r   r   Útest_constant_bothQ   s
    z!TestParameters.test_constant_bothc                 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 r$   )
r   r   r   r   r   r   r   Zfoo_nor   r   r   r   r   r   Útest_constant_no\   s
    zTestParameters.test_constant_noc                 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 r$   )
r   r   r   r   r   r   r   Zfoo_sumr   r   r   r   r   r   Útest_constant_sumg   s
    z TestParameters.test_constant_sumN)Ú__name__Ú
__module__Ú__qualname__r   ZgetpathÚsourcesr   ÚmarkZslowr   r   r   r!   r"   r#   r&   r'   r(   r   r   r   r   r   	   s0   û














r   )Úosr   Únumpyr   Ú r   ZF2PyTestr   r   r   r   r   Ú<module>   s   