
    G/Ph                     P    d dl Z d dlZd dlZddlmZ  G d dej                  ZdS )    N   )utilc                   v   e Zd Z ej        dddd           ej        dddd           ej        dddd           ej        dddd           ej        dddd           ej        dddd	          gZej        j        d
             Z	ej        j        d             Z
ej        j        d             Zej        j        d             Zej        j        d             Zej        j        d             Zej        j        d             Zej        j        d             Zej        j        d             Zd Zd Zd ZdS )TestParameterstestssrc	parameterzconstant_real.f90zconstant_integer.f90zconstant_both.f90zconstant_compound.f90zconstant_non_compound.f90zconstant_array.f90c                 H   t          j        dt           j                  d d d         }t          j        t
          | j        j        |           t          j        dt           j                  }| j                            |           t          j        |g d          sJ d S N   dtype      )   r   r   )	nparangefloat32pytestraises
ValueErrormodule
foo_singleallcloseselfxs     _/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/numpy/f2py/tests/test_parameter.pytest_constant_real_singlez(TestParameters.test_constant_real_single        Iarz***33Q3/j$+"8!<<< Iarz***q!!!{13334444444    c                 H   t          j        dt           j                  d d d         }t          j        t
          | j        j        |           t          j        dt           j                  }| j                            |           t          j        |g d          sJ d S r   )	r   r   float64r   r   r   r   
foo_doubler   r   s     r   test_constant_real_doublez(TestParameters.test_constant_real_double   r    r!   c                 H   t          j        dt           j                  d d d         }t          j        t
          | j        j        |           t          j        dt           j                  }| j                            |           t          j        |g d          sJ d S )Nr   r   r   r   )   r   r   )	r   r   int32r   r   r   r   foo_compound_intr   r   s     r   test_constant_compound_intz)TestParameters.test_constant_compound_int*   s     Iarx(((1-j$+">BBB Iarx((($$Q'''{13334444444r!   c                     t          j        dt           j                  }| j                            |           t          j        |g d          sJ d S )N   r   )   r   r   r   )r   r   r(   r   foo_non_compound_intr   r   s     r   test_constant_non_compound_intz-TestParameters.test_constant_non_compound_int5   sU     Iarx(((((+++{1:::;;;;;;;r!   c                 H   t          j        dt           j                  d d d         }t          j        t
          | j        j        |           t          j        dt           j                  }| j                            |           t          j        |g d          sJ d S r   )	r   r   r(   r   r   r   r   foo_intr   r   s     r   test_constant_integer_intz(TestParameters.test_constant_integer_int<   s     Iarx(((1-j$+"5q999 Iarx(((A{13334444444r!   c                 H   t          j        dt           j                  d d d         }t          j        t
          | j        j        |           t          j        dt           j                  }| j                            |           t          j        |g d          sJ d S r   )	r   r   int64r   r   r   r   foo_longr   r   s     r   test_constant_integer_longz)TestParameters.test_constant_integer_longG   s     Iarx(((1-j$+"6::: Iarx(((Q{13334444444r!   c                 H   t          j        dt           j                  d d d         }t          j        t
          | j        j        |           t          j        dt           j                  }| j                            |           t          j        |g d          sJ d S Nr   r   r   r   )   r   r   )	r   r   r#   r   r   r   r   foor   r   s     r   test_constant_bothz!TestParameters.test_constant_bothR   s     Iarz***33Q3/j$+/1555 Iarz***{1GGGHHHHHHHr!   c                 H   t          j        dt           j                  d d d         }t          j        t
          | j        j        |           t          j        dt           j                  }| j                            |           t          j        |g d          sJ d S r8   )	r   r   r#   r   r   r   r   foo_nor   r   s     r   test_constant_nozTestParameters.test_constant_no]   s     Iarz***33Q3/j$+"4a888 Iarz***1{1GGGHHHHHHHr!   c                 H   t          j        dt           j                  d d d         }t          j        t
          | j        j        |           t          j        dt           j                  }| j                            |           t          j        |g d          sJ d S r8   )	r   r   r#   r   r   r   r   foo_sumr   r   s     r   test_constant_sumz TestParameters.test_constant_sumh   s     Iarz***33Q3/j$+"5q999 Iarz***A{1GGGHHHHHHHr!   c                 N   t          j        dt           j                  }t          j        dt           j                  }| j                            ||          }t          j        |g d          sJ t          j        |g d          sJ t          j        |d          sJ d S )Nr   r      )        g?g?)rD   g      $@g      4@g      >@g      D@g      3@)r   r   r#   r   	foo_arrayr   )r   r   yzs       r   test_constant_arrayz"TestParameters.test_constant_arrays   s    Iarz***Iarz***K!!!Q''{111122222{1???@@@@@{1d#######r!   c                     t          j        dt           j                  }| j                            |          }t          j        ||                    dd                    sJ d S )Nr   r   )r   r   F)order)r   r   r#   r   foo_array_any_indexr   reshape)r   r   rF   s      r   test_constant_array_any_indexz,TestParameters.test_constant_array_any_index{   s[    Iarz***K++A..{1aiici::;;;;;;;r!   c                 H    | j                                         }|dk    sJ d S )N	   )r   foo_array_delimsr   s     r   test_constant_array_delimsz)TestParameters.test_constant_array_delims   s&    K((**Avvvvvvr!   N)__name__
__module____qualname__r   getpathsourcesr   markslowr   r%   r*   r/   r2   r6   r;   r>   rA   rH   rN   rR    r!   r   r   r   	   s         	We[2EFFWe[2HIIWe[2EFFWe[2IJJWe[2MNNWe[2FGGG [5 5 5 [5 5 5 [5 5 5 [< < < [5 5 5 [5 5 5 [I I I [I I I [I I I$ $ $< < <
    r!   r   )osr   numpyr    r   F2PyTestr   rZ   r!   r   <module>r_      su    				           y y y y yT] y y y y yr!   