+
   Qb4                      ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt	^RI
Ht ]P                  P                   ! R R]P                  4      4       t]P                  P                   ! R R]4      4       t]P                  P                   ! R R]P                  4      4       t]P                  P                   ! R	 R
]P                  4      4       t]P                  P                   ! R R]P                  4      4       t]P                  P                  ]P                  P)                  ]P*                  ! 4       P-                  4       R8H  RRR7       ! R R]P                  4      4       4       tR# )    N)utilc                   l  a  ] tR t^t o ]P
                  ! RRRR4      .t]P                  P                  RRR.4      R 4       t
R	 tR
 t]P                  P                  ]P                  R8H  RR7      R 4       t]P                  P                  ]P                  R8H  RR7      R 4       tR tR tRtV tR# )TestF77Callbacktestssrccallbackzfoo.fnamett2c                (    V P                  V4       R # N)check_function)selfr	   s   &&C/usr/lib/python3.14/site-packages/numpy/f2py/tests/test_callback.pytest_allTestF77Callback.test_all   s    D!    c                2    \         P                  ! R 4      pR# )a          a = t(fun,[fun_extra_args])

        Wrapper for ``t``.

        Parameters
        ----------
        fun : call-back function

        Other Parameters
        ----------------
        fun_extra_args : input tuple, optional
            Default: ()

        Returns
        -------
        a : int

        Notes
        -----
        Call-back functions::

            def fun(): return a
            Return objects:
                a : int
        N)textwrapdedent)r   expecteds   & r   test_docstringTestF77Callback.test_docstring   s    ?? $ r   c                8   \        V P                  V4      pV! R  4      pV! R RR7      pV! R RR7      pV! R R	R7      pV! \        P                  \        P                  3R7      pV! \        P                  \        P                  3R7      pV! V P                  P
                  RR7      pV! V P                  P                  4      pV! V P                  P                  P                  4      p ! R R4      pV! 4       pV! V4      pV! VP                  4      pR# )
c                      ^# )    r   r   r   <lambda>0TestF77Callback.check_function.<locals>.<lambda>7   s    ar   c                     ^#    r   as   &r   r   r   9       r   )fun_extra_argsc                     V # r   r   r#   s   &r   r   r   ;   r%   r   c                     ^V ,           # r!   r   r#   s   &r   r   r   =   s    Ar   c                   ,   a  ] tR t^Kt o R tR tRtV tR# ))TestF77Callback.check_function.<locals>.Ac                    ^#    r   r   s   &r   __call__2TestF77Callback.check_function.<locals>.A.__call__L       r   c                    ^	# )	   r   r.   s   &r   mth-TestF77Callback.check_function.<locals>.A.mthO   r1   r   r   N)__name__
__module____qualname____firstlineno__r/   r4   __static_attributes____classdictcell____classdict__s   @r   Ar*   K   s      r   r>   N)   r,   )	getattrmodulemathdegreespifuncfunc0	_cpointerr4   )r   r	   r
   rr>   r$   s   &&    r   r   TestF77Callback.check_function5   s    DKK&iLk%0k%0oe4dllDGG;7dllDGG;7 dkku5dkk dkk))*	 	 CaDaeeHr   win32z)Fails with MinGW64 Gfortran (Issue #9673))reasonc                H    R  pV P                   P                  pV! V4      pR# )c                     V R 8X  d   ^ # ^# )rH   r   )codes   &r   r   6TestF77Callback.test_string_callback.<locals>.callback[   s    s{r   N)rA   string_callback)r   r   frH   s   &   r   test_string_callback$TestF77Callback.test_string_callbackX   s!    	 KK''hKr   c                    \         P                  ! RR4      p\         P                  ! RR4      p\         P                  ! R.R4      pR pV P                  P                  pWV3 F  pV! WFVP
                  4      pK  	  R# )   S8c c                     V P                   V38w  d   ^# V P                  R8w  d   ^# \        P                  ! V R8H  4      '       g   ^# ^ # )rU   rV   r   )shapedtypenpall)culencus   &&r   r   <TestF77Callback.test_string_callback_array.<locals>.callbackm   s;    xxE8#xx466")$$r   NrU   )rU      )r\   zerosarrayrA   string_callback_arraysize)r   cu1cu2cu3r   rQ   r^   ress   &       r   test_string_callback_array*TestF77Callback.test_string_callback_arraye   sj     hhud#hhvs#hhtT"	 KK--S/BH"''*C "r   c           
     Z  a aa . oV 3R  loVVV 3R lpR UUu. uF-  p\        ^4       F  p\        P                  ! W3R7      NK  	  K/  	  pppV F  pVP                  4        K  	  V F  pVP	                  4        K  	  RP	                  S4      oS'       d   \        S4      hR# u uppi )c                  l   < \         P                  ! R 4       SP                  P                  R 4      p ^*# )gMbP?c                      ^{# {   r   r   r   r   r   ?TestF77Callback.test_threadsafety.<locals>.cb.<locals>.<lambda>   s    cr   )timesleeprA   r
   )rH   r   s    r   cb-TestF77Callback.test_threadsafety.<locals>.cb   s*     JJt k*A r   c                    <  \        ^24       F/  pSP                  P                  S4      pSP                  V 4       K1  	  R#   \         d)    SP                  \        P                  ! 4       4        R# i ; i)2   N)rangerA   r
   r   	Exceptionappend	traceback
format_exc)r	   jrH   ru   errorsr   s   &  r   runner1TestF77Callback.test_threadsafety.<locals>.runner   s\    6rAb)A''- #  6i22456s   >A /A65A6)targetargsz

N)r
   r   )ry   	threadingThreadstartjoinAssertionError)r   r   argnthreadsr
   ru   r   s   f     @@r   test_threadsafety!TestF77Callback.test_threadsafety{   s     			6 #
"E"Iq F9,5 :" 	 

 AGGI  AFFH  V$ (( 
s   3B'c                    V P                   P                  ^4        V P                   P                  ^4       R V P                   n        V P                   P                  ^4      pR V P                   n        V P                   P                  ^4      pV P                   = V P                   P                  ^4       RR lV P                   n        V P                   P                  ^4      pV P                   P                  ^4      pR#   \         d   p Rp?LRp?ii ; i  \         d   p Rp?LRp?ii ; i  \         d   p Rp?LRp?ii ; i)   Nc                     V ^,           # ra   r   xs   &r   r   6TestF77Callback.test_hidden_callback.<locals>.<lambda>       Qr   c                     V ^,           # )r   r   r   s   &r   r   r      r   r   c                     V ^,           # )   r   r   s   &r   r   r      s    1q5r   )r   )rA   hidden_callbackrz   hidden_callback2global_f)r   msgrH   s   &  r   test_hidden_callback$TestF77Callback.test_hidden_callback   s   	HKK''*	LKK((+  /KK''*  /KK''* KK 	HKK''*  1KK''* KK((+7  	H 	H 	H
  	L 	L 	L  	H 	H 	Hs4   D D  D7 DDD4/D47EEr   N)r6   r7   r8   r9   r   getpathsourcespytestmarkparametrizer   r   r   skipifsysplatformrR   rk   r   r   r:   r;   r<   s   @r   r   r      s     ||GUJ@AG[[Vc4[1" 2"1:!F [[/J  L	L	 [[/J  LL(&)P r   r   c                        ] tR t^tRtR.tRtR# )TestF77CallbackPythonTLSzO
Callback tests using Python thread-local storage instead of
compiler-provided
z-DF2PY_USE_PYTHON_TLSr   N)r6   r7   r8   r9   __doc__optionsr:   r   r   r   r   r      s    
 ''Gr   r   c                   R   a  ] tR t^t o ]P
                  ! RRRR4      .tR tRtV t	R# )TestF90Callbackr   r   r   zgh17797.f90c                    R  p\         P                  ! . RO\         P                  R7      pV P                  P	                  W4      pR# )c                     V ^{,           # rp   r   r   s   &r   incr*TestF90Callback.test_gh17797.<locals>.incr   s    s7Nr   )r[   N)rU   r   r   )r\   rd   int64rA   gh17797)r   r   yrH   s   &   r   test_gh17797TestF90Callback.test_gh17797   s1    	 HHYbhh/KK(r   r   N)
r6   r7   r8   r9   r   r   r   r   r:   r;   r<   s   @r   r   r      s&     ||GUJFGG$ $r   r   c                   V   a  ] tR t^t o Rt]P                  ! RRRR4      .tR tRt	V t
R# )	TestGH18335zThe reproduction of the reported issue requires specific input that
extensions may break the issue conditions, so the reproducer is
implemented as a separate test class. Do not extend this test with
other tests!
r   r   r   zgh18335.f90c                B    R  pV P                   P                  V4      pR# )c                 0    V ^ ;;,          ^,          uu&   R# )r   Nr   r   s   &r   foo%TestGH18335.test_gh18335.<locals>.foo   s    aDAIDr   N)rA   gh18335)r   r   rH   s   &  r   test_gh18335TestGH18335.test_gh18335   s    	 KK$r   r   N)r6   r7   r8   r9   r   r   r   r   r   r:   r;   r<   s   @r   r   r      s-     
 ||GUJFGG r   r   c                   ~   a  ] tR t^t o ]P
                  ! RRRR4      ]P
                  ! RRRR4      .tRtR tRt	V t
R	# )
TestGH25211r   r   r   z	gh25211.fzgh25211.pyf	callback2c                B    R  pV P                   P                  V4      pR# )c                     W ,          # r   r   r   s   &r   bar%TestGH25211.test_gh25211.<locals>.bar   s	    5Lr   N)rA   r   )r   r   rj   s   &  r   test_gh25211TestGH25211.test_gh25211   s    	 kkooc"r   r   N)r6   r7   r8   r9   r   r   r   module_namer   r:   r;   r<   s   @r   r   r      s@     ||GUJD||GUJFHGK r   r   darwinFz*Callback aborts cause CI failures on macOS)	conditionrunrK   c                   X   a  ] tR t^t o ]P
                  ! RRRR4      .tR.tR tRt	V t
R# )	TestCBFortranCallstatementr   r   r   zgh26681.f90z--lowerc                0   \         P                  ! \        R R7      ;_uu_ 4       pV P                  P                  P
                  V P                  n        V P                  P                  P                  R 4       RRR4       R#   + '       g   i     R# ; i)helpme)matchN)r   raises
ValueErrorrA   utilsmy_abort
mypy_abortdo_something)r   excs   & r   test_callstatement_fortran5TestCBFortranCallstatement.test_callstatement_fortran  sX    ]]:X66#%)[[%6%6%?%?DKK"KK**84 7666s   ABB	r   N)r6   r7   r8   r9   r   r   r   r   r   r:   r;   r<   s   @r   r   r      s/     
 ||GUJFGGkG5 5r   r   )rB   r   r   r   r   rs   r|   r   numpyr\   rX   r   r   slowF2PyTestr   r   r   r   r   xfailsystemlowerr   r   r   r   <module>r      sT     
        qdmm q qh ( ( ( 	$dmm 	$ 	$ $--    
$-- 
 
 hoo/5578CF  H5 5H 5r   