
    Bwg                     J    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       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y)TestParameterstestssrc	parameterzconstant_real.f90zconstant_integer.f90zconstant_both.f90zconstant_compound.f90zconstant_non_compound.f90zconstant_array.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     V/var/www/horilla/myenv/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!   c                 h   t        j                  dt         j                        }t        j                  dt         j                        }| j                  j	                  ||      }t        j
                  |g d      sJ t        j
                  |g d      sJ t        j
                  |d      sJ y )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_arrayr   s~    IIarzz*IIarzz*KK!!!Q'{{11222{{1?@@@{{1d###r!   c                     t        j                  dt         j                        }| j                  j	                  |      }t        j
                  ||j                  dd            sJ y )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_indexz   sK    IIarzz*KK++A.{{1aiici:;;;r!   c                 F    | j                   j                         }|dk(  sJ y )N	   )r   foo_array_delimsr   s     r   test_constant_array_delimsz)TestParameters.test_constant_array_delims   s    KK((*Avvr!   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We[2HIWe[2EFWe[2IJWe[2MNWe[2FGG [[5 5 [[5 5 [[5 5 [[< < [[5 5 [[5 5 [[I I [[I I [[I I$<
r!   r   )r   numpyr    r   F2PyTestr   rZ   r!   r   <module>r^      s       yT]] yr!   