
    ,|he                     R    d dl Z d dlZd dlZddlmZ  G d dej                        Zy)    N   )utilc            
          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      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y)TestParameterstestssrc	parameterzconstant_real.f90zconstant_integer.f90zconstant_both.f90zconstant_compound.f90zconstant_non_compound.f90c                 l   t        j                  dt         j                        d d d   }t        j                  t
        | j                  j                  |       t        j                  dt         j                        }| j                  j                  |       t        j                  |g d      sJ y N   dtype      )   r   r   )	nparangefloat32pytestraises
ValueErrormodule
foo_singleallcloseselfxs     ^/var/www/html/test/engine/venv/lib/python3.12/site-packages/numpy/f2py/tests/test_parameter.pytest_constant_real_singlez(TestParameters.test_constant_real_single   x     IIarzz*3Q3/j$++"8"8!< IIarzz*q!{{13444    c                 l   t        j                  dt         j                        d d d   }t        j                  t
        | j                  j                  |       t        j                  dt         j                        }| j                  j                  |       t        j                  |g d      sJ y r   )	r   r   float64r   r   r   r   
foo_doubler   r   s     r   test_constant_real_doublez(TestParameters.test_constant_real_double   r    r!   c                 l   t        j                  dt         j                        d d d   }t        j                  t
        | j                  j                  |       t        j                  dt         j                        }| j                  j                  |       t        j                  |g d      sJ y )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)   sx     IIarxx(1-j$++">">B IIarxx($$Q'{{13444r!   c                     t        j                  dt         j                        }| j                  j	                  |       t        j
                  |g d      sJ y )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_int4   s?     IIarxx(((+{{1:;;;r!   c                 l   t        j                  dt         j                        d d d   }t        j                  t
        | j                  j                  |       t        j                  dt         j                        }| j                  j                  |       t        j                  |g d      sJ y r   )	r   r   r(   r   r   r   r   foo_intr   r   s     r   test_constant_integer_intz(TestParameters.test_constant_integer_int;   sx     IIarxx(1-j$++"5"5q9 IIarxx(A{{13444r!   c                 l   t        j                  dt         j                        d d d   }t        j                  t
        | j                  j                  |       t        j                  dt         j                        }| j                  j                  |       t        j                  |g d      sJ y r   )	r   r   int64r   r   r   r   foo_longr   r   s     r   test_constant_integer_longz)TestParameters.test_constant_integer_longF   sx     IIarxx(1-j$++"6"6: IIarxx(Q{{13444r!   c                 l   t        j                  dt         j                        d d d   }t        j                  t
        | j                  j                  |       t        j                  dt         j                        }| j                  j                  |       t        j                  |g d      sJ y Nr   r   r   r   )   r   r   )	r   r   r#   r   r   r   r   foor   r   s     r   test_constant_bothz!TestParameters.test_constant_bothQ   st     IIarzz*3Q3/j$++//15 IIarzz*{{1GHHHr!   c                 l   t        j                  dt         j                        d d d   }t        j                  t
        | j                  j                  |       t        j                  dt         j                        }| j                  j                  |       t        j                  |g d      sJ y r8   )	r   r   r#   r   r   r   r   foo_nor   r   s     r   test_constant_nozTestParameters.test_constant_no\   sx     IIarzz*3Q3/j$++"4"4a8 IIarzz*1{{1GHHHr!   c                 l   t        j                  dt         j                        d d d   }t        j                  t
        | j                  j                  |       t        j                  dt         j                        }| j                  j                  |       t        j                  |g d      sJ y r8   )	r   r   r#   r   r   r   r   foo_sumr   r   s     r   test_constant_sumz TestParameters.test_constant_sumg   sx     IIarzz*3Q3/j$++"5"5q9 IIarzz*A{{1GHHHr!   N)__name__
__module____qualname__r   getpathsourcesr   markslowr   r%   r*   r/   r2   r6   r;   r>   rA    r!   r   r   r   	   s    	We[2EFWe[2HIWe[2EFWe[2IJWe[2MNG [[5 5 [[5 5 [[5 5 [[< < [[5 5 [[5 5 [[I I [[I I [[I Ir!   r   )osr   numpyr    r   F2PyTestr   rI   r!   r   <module>rN      s%    	   gIT]] gIr!   