3
KdF                 @   sR   d dl Z d dlZd dlZd dlmZmZ ddlmZ dd Z	G dd dej
ZdS )	    N)assert_raisesassert_equal   )utilc              G   s   t jjt jjtf|   S )N)ospathjoindirname__file__)a r   S/var/www/html/virt/lib64/python3.6/site-packages/numpy/f2py/tests/test_parameter.py_path
   s    r   c               @   s   e Zd Zedddedddedddeddde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 )TestParameterssrc	parameterzconstant_real.f90zconstant_integer.f90zconstant_both.f90zconstant_compound.f90zconstant_non_compound.f90c             C   sZ   t jdt jdd d d }tt| jj| t jdt jd}| jj| t|d	ddg d S )
N   )dtype      r   r   r   r      )nparangeZfloat32r   
ValueErrormoduleZ
foo_singler   )selfxr   r   r   test_constant_real_single   s
    z(TestParameters.test_constant_real_singlec             C   sZ   t jdt jdd d d }tt| jj| t jdt jd}| jj| t|d	ddg d S )
Nr   )r   r   r   r   r   r   r   r   )r   r   float64r   r   r   Z
foo_doubler   )r   r   r   r   r   test_constant_real_double"   s
    z(TestParameters.test_constant_real_doublec             C   sZ   t jdt jdd d d }tt| jj| t jdt jd}| jj| t|d	ddg d S )
Nr   )r   r   r   r   r   r         )r   r   int32r   r   r   Zfoo_compound_intr   )r   r   r   r   r   test_constant_compound_int-   s
    z)TestParameters.test_constant_compound_intc             C   s2   t jdt jd}| jj| t|d
dddg d S )N   )r   r   r   r   r   r   r   r       )r   r   r"   r   Zfoo_non_compound_intr   )r   r   r   r   r   test_constant_non_compound_int8   s    z-TestParameters.test_constant_non_compound_intc             C   sZ   t jdt jdd d d }tt| jj| t jdt jd}| jj| t|d	ddg d S )
Nr   )r   r   r   r   r   r   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   sZ   t jdt jdd d d }tt| jj| t jdt jd}| jj| t|d	ddg d S )
Nr   )r   r   r   r   r   r   r   r   )r   r   Zint64r   r   r   Zfoo_longr   )r   r   r   r   r   test_constant_integer_longJ   s
    z)TestParameters.test_constant_integer_longc             C   sZ   t jdt jdd d d }tt| jj| t jdt jd}| jj| t|dddg d S )Nr   )r   r   r   r   r   r   	   r)   r         r   r   )r   r   r   r   r   r   Zfoor   )r   r   r   r   r   test_constant_bothU   s
    z!TestParameters.test_constant_bothc             C   sZ   t jdt jdd d d }tt| jj| t jdt jd}| jj| t|dddg d S )Nr   )r   r   r   r   r   r   r)   r)   r   r*   r+   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   sZ   t jdt jdd d d }tt| jj| t jdt jd}| jj| t|dddg d S )Nr   )r   r   r   r   r   r   r)   r)   r   r*   r+   r   r   )r   r   r   r   r   r   Zfoo_sumr   )r   r   r   r   r   test_constant_sumk   s
    z TestParameters.test_constant_sumN)__name__
__module____qualname__r   sourcespytestmarkZslowr   r   r#   r&   r'   r(   r,   r-   r.   r   r   r   r   r      s   



r   )r   r3   Znumpyr   Znumpy.testingr   r    r   r   ZF2PyTestr   r   r   r   r   <module>   s   