+
    CDjC                        ^ 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   &&X/data/cameron/venvs/s3viz/lib/python3.14/site-packages/numpy/f2py/tests/test_callback.pytest_allTestF77Callback.test_all   s    D!    c                    \         P                  ! R 4      pV P                  P                  P                  V8X  g   Q h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moduler
   __doc__)r   expecteds   & r   test_docstringTestF77Callback.test_docstring   s3    ?? $ 4 {{}}$$000r   c                   \        V P                  V4      pV! R  4      pV^8X  g   Q hV! R RR7      pV^8X  g   Q hV! R RR7      pV^8X  g   Q hV! R R	R7      pV^8X  g   Q hV! \        P                  \        P                  3R7      pV^8X  g   Q hV! \        P                  \        P                  3R7      pV^8X  g   Q hV! V P                  P
                  RR7      pV^8X  g   Q hV! V P                  P                  4      pV^8X  g   Q hV! V P                  P                  P                  4      pV^8X  g   Q h ! R R4      pV! 4       pV! V4      pV^8X  g   Q hV! VP                  4      pV^	8X  g   Q h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   r0   s   &r   mth-TestF77Callback.check_function.<locals>.A.mthO   r3   r   r   N)__name__
__module____qualname____firstlineno__r1   r6   __static_attributes____classdictcell____classdict__s   @r   Ar,   K   s      r   r@   N)   r.   )	getattrr   mathdegreespifuncfunc0	_cpointerr6   )r   r	   r
   rr@   r&   s   &&    r   r   TestF77Callback.check_function5   sQ   DKK&iLAvvk%0Avvk%0Avvoe4BwwdllDGG;7CxxdllDGG;7Cxxdkku5Bwwdkk Bwwdkk))*Bww	 	 CaDAvvaeeHAvvr   win32z)Fails with MinGW64 Gfortran (Issue #9673))reasonc                Z    R  pV P                   P                  pV! V4      pV^ 8X  g   Q hR# )c                     V R 8X  d   ^ # ^# )rI   r   )codes   &r   r   6TestF77Callback.test_string_callback.<locals>.callback[   s    s{r   N)r   string_callback)r   r   frI   s   &   r   test_string_callback$TestF77Callback.test_string_callbackX   s,    	 KK''hKAvvr   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V^ 8X  d   K  Q h	  R# )   S8c c                     V P                   V38w  d   ^# V P                  R8w  d   ^# \        P                  ! V R8H  4      '       g   ^# ^ # )rV   rW   r   )shapedtypenpall)culencus   &&r   r   <TestF77Callback.test_string_callback_array.<locals>.callbackm   s;    xxE8#xx466")$$r   NrV   )rV      )r]   zerosarrayr   string_callback_arraysize)r   cu1cu2cu3r   rR   r_   ress   &       r   test_string_callback_array*TestF77Callback.test_string_callback_arraye   su     hhud#hhvs#hhtT"	 KK--S/BH"''*C!8O8 "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                  ~   < \         P                  ! R 4       SP                  P                  R 4      p V ^{8X  g   Q h^*# )gMbP?c                      ^{# {   r   r   r   r   r    ?TestF77Callback.test_threadsafety.<locals>.cb.<locals>.<lambda>   s    cr   )timesleepr   r
   )rI   r   s    r   cb-TestF77Callback.test_threadsafety.<locals>.cb   s3     JJt k*A8O8r   c                   <  \        ^24       F8  pSP                  P                  S4      pV^*8X  g   Q hSP                  V 4       K:  	  R#   \         d)    SP                  \        P                  ! 4       4        R# i ; i)2   N)ranger   r
   r   	Exceptionappend	traceback
format_exc)r	   jrI   rv   errorsr   s   &  r   runner1TestF77Callback.test_threadsafety.<locals>.runner   sg    6rAb)A7N7''- #  6i22456s   AA /A?>A?)targetargsz

N)r
   r   )rz   	threadingThreadstartjoinAssertionError)r   r   argnthreadsr
   rv   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V^8X  g   Q hR V P                   n        V P                   P                  ^4      pV^8X  g   Q hV P                   = V P                   P                  ^4       RR lV P                   n        V P                   P                  ^4      pV^8X  g   Q hV P                   P                  ^4      pV^8X  g   Q hR#   \         d.   p\        T4      P	                  R4      '       g   Q h Rp?ELARp?ii ; i  \         d.   p\        T4      P	                  R4      '       g   Q h Rp?EL`Rp?ii ; i  \         d.   p\        T4      P	                  R4      '       g   Q h Rp?ELRp?ii ; i)   zCallback global_f not definedNz!cb: Callback global_f not definedc                     V ^,           # rb   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   )r   hidden_callbackr{   str
startswithhidden_callback2global_f)r   msgrI   s   &  r   test_hidden_callback$TestF77Callback.test_hidden_callback   s   	HKK''*	LKK((+  /KK''*Avv.KK''*AvvKK 	HKK''*  1KK''*Avv KK((+Avv9  	Hs8&&'FGGGG	H
  	Ls8&&'JKKKK	L  	Hs8&&'FGGGG	HsF   D+ E& 2F! +E#6"EE#&F1"FF!G,"GGr   N)r8   r9   r:   r;   r   getpathsourcespytestmarkparametrizer   r   r   skipifsysplatformrS   rl   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)r8   r9   r:   r;   r   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V^8X  g   Q hR# )c                     V ^{,           # rq   r   r   s   &r   incr*TestF90Callback.test_gh17797.<locals>.incr   s    s7Nr   )r\   N)rV   r   r   )r]   re   int64r   gh17797)r   r   yrI   s   &   r   test_gh17797TestF90Callback.test_gh17797   s?    	 HHYbhh/KK(O###r   r   N)
r8   r9   r:   r;   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                T    R  pV P                   P                  V4      pV^|8X  g   Q hR# )c                 0    V ^ ;;,          ^,          uu&   R# )r   Nr   r   s   &r   foo%TestGH18335.test_gh18335.<locals>.foo   s    aDAIDr   N)r   gh18335)r   r   rI   s   &  r   test_gh18335TestGH18335.test_gh18335   s)    	 KK$G||r   r   N)r8   r9   r:   r;   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                T    R  pV P                   P                  V4      pV^n8X  g   Q hR# )c                     W ,          # r   r   r   s   &r   bar%TestGH25211.test_gh25211.<locals>.bar   s	    5Lr   N)r   r   )r   r   rk   s   &  r   test_gh25211TestGH25211.test_gh25211   s'    	 kkooc"czzr   r   N)r8   r9   r:   r;   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runrL   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
ValueErrorr   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)r8   r9   r:   r;   r   r   r   r   r   r<   r=   r>   s   @r   r   r      s/     
 ||GUJFGGkG5 5r   r   )rC   r   r   r   r   rt   r}   r   numpyr]   rY   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   