+
    :i                     b   ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIHt ^ RI	t
^ RIHtHtHtHt ^ RIHtHt ^ RIHt ^ RIHtHt ^ RIHt ^ R	IHt ^ R
IHt ^ RIHtHt ^ RIH t! ^ RI"t"]!R,
          t# ^ RI$t$ ^ RI&t&]PN                  ! 4       R8H  t(R t)R t*R t+R1R lt,R2R lt-R3R lt.R3R lt/R4R lt0 ! R R]4      t1 ! R R]14      t2 ! R R]14      t3 ! R R]34      t4 ! R R ]4      t5 ! R! R"]4      t6 ! R# R$]"P*                  4      t7 ! R% R&]"P*                  4      t8]R5R' l4       t9]R4R( l4       t:]R) 4       t;]];3R* l4       t<R+ t= ! R, R-]]"P*                  4      t> ! R. R/]"P*                  4      t?]@R08X  d   ]"P                  ! 4        R# R#   ]% d    Rt$ EL$i ; i  ]% d    Rt& EL/i ; i)6    N)chain)StringIO)njitjittypeof	vectorize)typeserrors)_dispatcher)TestCasecaptured_stdout)as_dtype)
Dispatcher)overload)needs_lapackSerialMixin)_TIMEOUTg      N@armv7lc                     V # N xs   &Y/var/www/html/photoedit/myenv/lib/python3.14/site-packages/numba/tests/test_dispatcher.pydummyr   &   s    H    c                     W,           # r   r   r   ys   &&r   addr    *   s	    5Lr   c                      W,
          V,           # r   r   r   r   zs   &&&r   addsubr$   .       519r   c                      W,
          V,           # r   r   r"   s   &&&r   addsub_defaultsr'   2   r%   r   c                 
    WV3# r   r   r"   s   &&*r   star_defaultsr)   6   s    7Nr   c                 V    \        V \        P                  4      '       d   R  pV# R pV# )c                     W,           # r   r   r   s   &&r   implgenerated_usecase.<locals>.impl<   	    5Lr   c                     W,
          # r   r   r   s   &&r   r,   r-   ?   r.   r   
isinstancer	   Complexr   r   r,   s   && r   generated_usecaser4   :   s)    !U]]##	
 K	Kr   c                 Z    \        V \        P                  4      '       d   R  pV# RR lpV# )c                     V # r   r   r   s   &r   r,   #bad_generated_usecase.<locals>.implF       Hr   c                     W,
          # r   r   r   s   &&r   r,   r7   I   r.   r   )   r0   r3   s   && r   bad_generated_usecaser;   D   s)    !U]]##	
 K	Kr   c                   a \        V\        P                  P                  \        P                  P                  34      '       d   \
        P                  ! R  W3 4       !  oMW\        V\        P                  \        P                  34      '       d   \        V4      oM\        R\        V4      ,          4      hRV3R llpV# )c              3   v   "   T F/  p\         P                  ! VP                  P                  4      x  K1  	  R # 5ir   )npdtypename).0arys   & r   	<genexpr>*dtype_generated_usecase.<locals>.<genexpr>P   s+      %6.4s &(XXciinn%=%=.4s   79zUnhandled Type %sc                 H   < \         P                  ! V P                  SR 7      # )r?   )r>   onesshape)abr?   	out_dtypes   &&&r   _fn$dtype_generated_usecase.<locals>._fnW   s    wwqwwi00r   r   )r1   r	   miscNoneTypeOmittedr>   result_typeDTypeNumberClassr   	TypeErrortype)rI   rJ   r?   rL   rK   s   &&& @r   dtype_generated_usecaserV   N   s    %%**--uzz/A/ABCCNN %6/0f%6 7		EEKK):):;	<	<UO	+d5k9::1 Jr   c                   8   a  ] tR t^]t o ]! RR7      tR tRtV tR# )BaseTestTnopythonc                V   a aa VVV 3R  lp\        R/ S P                  B ! S4      oSV3# )c                  J   < S! V / VB pS! V / VB pSP                  W24       R # r   )assertPreciseEqual)argskwargsexpectedresultfpyfuncselfs   *,  r   check$BaseTest.compile_func.<locals>.checkb   s/    t.v.H''F##F5r   r   )r   jit_args)rd   rc   re   rb   s   ff @r   compile_funcBaseTest.compile_funca   s)    	6  $-- (%xr   r   N)	__name__
__module____qualname____firstlineno__dictrg   rh   __static_attributes____classdictcell____classdict__s   @r   rX   rX   ]   s     T"H r   rX   c                   *  a  ] tR t^jt o R tR tR tR tR tR t	R t
R tR	 tR
 tR tR tR tR t]]P(                  ! ]R4      R 4       4       t]P(                  ! ]R4      R 4       t]]P(                  ! ]R4      R 4       4       tR tR tRtV tR# )TestDispatcherc                    \         R  4       p\         R 4       pV P                  W8H  R4       V P                  W8H  R4       V P                  VR8H  R4       R# )c                     V # r   r   r   s   &r   foo)TestDispatcher.test_equality.<locals>.foom       Hr   c                     V # r   r   r   s   &r   bar)TestDispatcher.test_equality.<locals>.barq   ry   r   TFNr   assertEqual)rd   rw   r{   s   &  r   test_equalityTestDispatcher.test_equalityl   sb    		 
	 
	 
	 	T*U+e,r   c                    \         R  4       pV! ^4       VP                  P                  4       w  pV P                  VP                  P
                  VP                  P
                  4       R# )c                     V # r   r   r   s   &r   rw   +TestDispatcher.test_dyn_pyfunc.<locals>.foo}   ry   r   N)r   	overloadsvaluesr~   entry_pointrk   py_func)rd   rw   crs   &  r   test_dyn_pyfuncTestDispatcher.test_dyn_pyfunc|   sU    		 
	 	A}}##%22CKK4J4JKr   c                ,    \         R  4       pV! 4        R# )c                      ^#    r   r   r   r   rw   ,TestDispatcher.test_no_argument.<locals>.foo   s    r   Nr   rd   rw   s   & r   test_no_argumentTestDispatcher.test_no_argument   s    		 
	 	r   c                   \        R R7      ! \        4      pV P                  V! ^{R4      \        ^{R4      4       V P                  V! RR4      \        RR4      4       V P                  V! RR4      \        RR4      4       V P                  V! RR4      \        RR4      4       \        RR R7      ! \        4      pV P                  V! ^{R4      \        ^{R4      4       V P                  V! RR4      \        ^^-4      4       V P                  \        4      ;_uu_ 4        V! RR4       RRR4       R#   + '       g   i     R# ; i)	TrY   i  g(@gF@y        F@l    F: z(i4, i4)N)r   r    r]   assertRaisesrT   )rd   c_adds   & r   test_coerce_input_types&TestDispatcher.test_coerce_input_types   s     T"3'c3S#?dD 13tT?CdE 2Ce4DEk3 7[#9NO J.s3c3S#?dD 13r2;?y))$ *)))s   
D11E	c                B   \         R 4       p^pRpV P                  V! W#4      W#,           4       V P                  \        VP                  4      ^4       V P                  V! W24      W2,           4       V P                  \        VP                  4      ^4       V P                  V! W34      W3,           4       V P                  \        VP                  4      ^4       V P                  V! ^^4      W",           4       V P                  \        VP                  4      ^R4       R# )z8Test compiling new version in an ambiguous case
        c                     W,           # r   r   rI   rJ   s   &&r   rw   6TestDispatcher.test_ambiguous_new_version.<locals>.foo   	    5Lr         ?zdidn't compile a new versionN)r   assertAlmostEqualr~   lenr   )rd   rw   INTFLTs   &   r   test_ambiguous_new_version)TestDispatcher.test_ambiguous_new_version   s     
	 
	 s3}ci8S]]+Q/s3}ci8S]]+Q/s3}ci8S]]+Q/ 	s1ay#)4S]]+Q 1: 	;r   c                &  a aa . o\         R 4       oVVV 3R lp\        ^4       Uu. uF  p\        P                  ! VR7      NK  	  ppV F  pVP	                  4        K  	  V F  pVP                  4        K  	  S P                  S4       R# u upi )zb
Test that (lazy) compiling from several threads at once doesn't
produce errors (see issue #908).
c                     V ^,           # r   r   r   s   &r   rw   %TestDispatcher.test_lock.<locals>.foo       q5Lr   c                     <  SP                  S! ^4      ^4       R#   \         d   p SP                  ! T 4        Rp ? R# Rp ? ii ; ir   N)r~   	Exceptionappend)er
   rw   rd   s    r   wrapper)TestDispatcher.test_lock.<locals>.wrapper   s;    !  Q+ !a  !s    AA  A)targetN)r   range	threadingThreadstartjoinassertFalse)rd   r   ithreadstr
   rw   s   f    @@r   	test_lockTestDispatcher.test_lock   s    
 		 
		! >C2YGY9##73YGAGGI AFFH   Hs    Bc                   \        R 4      ! \        4      pV P                  V! RR4      ^4       V P                  \	        VP
                  4      ^VP
                  4       \        R R.4      ! \        4      pV P                  V! ^^4      ^4       V P                  V! RR4      R4       V P                  V! \        P                  ! ^4      R4      R4       V P                  \        4      ;_uu_ 4       pV! RR4       RRR4       V P                  R\        XP                  4      4       V P                  \	        VP
                  4      ^VP
                  4       \        R	R.4      ! \        4      pV P                  V! \        P                  ! ^4      \        P                  ! R4      4      R
4       V P                  V! ^R4      R4       \        . RO4      ! \        4      pV P                  \        4      ;_uu_ 4       pV! R
R4       RRR4       V P                  \        VP                  4      R4       V P                  R\        VP                  4      4       R#   + '       g   i     ELi; i  + '       g   i     Lp; i)(int64,int64)r         @z(float64,float64)g      @      @              ?NzNo matching definitionz(float32,float32)      ?g     ?       @zAmbiguous overloading for <function add [^>]*> \(float64, float64\):\n\(float32, float64\) -> float64\n\(float64, float32\) -> float64int64g      `>)z(float32,float64)z(float64,float32)r   )r   r    r]   r~   r   r   r>   int32r   rT   assertInstr	exceptionfloat32assertRegexassertNotInrd   rb   cms   &  r   test_explicit_signatures'TestDispatcher.test_explicit_signatures   s    %#sQ/Q[[)1akk:"567<!Q+#sS1"((1+s 3S9y))Rb"I *.BLL0ABQ[[)1akk:$&9:;C@"**Q-F1C DcJ!V.@A " ##&( y))Rc3K * 	/	
 	#bll"341 *)) *)s   2
I>
I0I-	0J 	c                   R pV P                  \        4      ;_uu_ 4       p\        R4      ! \        4       RRR4       V P	                  V^ ,          \        XP                  4      4       V P                  \        4      ;_uu_ 4       p\        R4      ! \        4       RRR4       V P	                  V^,          \        VP                  4      4       V P                  \        4      ;_uu_ 4       p\        R4      ! \        4       RRR4       V P	                  V^,          \        VP                  4      4       \        RRR7      ! \        4       V P                  \        4      ;_uu_ 4       p\        RRR7      ! \        4       RRR4       V P	                  V^,          \        VP                  4      4       R#   + '       g   i     EL; i  + '       g   i     EL:; i  + '       g   i     L; i  + '       g   i     Ly; i)zKSignature mismatch: %d argument types given, but function takes 2 argumentsz()Nz(intc,)z(intc,intc,intc)Tforceobj)r   rT   r   r    r   r   r   )rd   tmplr   s   &  r   test_signature_mismatch&TestDispatcher.test_signature_mismatch   sB   $y))RIcN *dQhBLL 12y))R	N3 *dQhBLL 12y))R"#C( *dQhBLL 12D4 %y))R	D)#. *dQhBLL 12 *)) *)) *)
 *)s/   F:G.G",G5:G	G	"G2	5H	c                    \        R 4      ! \        4      pV P                  \        4      ;_uu_ 4       pV! RR4       RRR4       V P	                  \        XP                  4      R4       R#   + '       g   i     L7; i)z(intc,intc)r   NzBNo matching definition for argument type(s) complex128, complex128)r   r    r   rT   r~   r   r   r   s   &  r   test_matching_error_message*TestDispatcher.test_matching_error_message  sY    s#y))Rb"I *R\\*2	3 *)s   
A,,A<	c                   \         R  4       pVP                  R4       VP                  4        V P                  \        4      ;_uu_ 4       pVP                  R4       RRR4       V P                  \        XP                  4      R4       V P                  \        VP                  4      ^4       R#   + '       g   i     L\; i)c                     V # r   r   rI   s   &r   rw   5TestDispatcher.test_disabled_compilation.<locals>.foo  ry   r   
(float32,)(int32,)Ncompilation disabled)
r   compiledisable_compiler   RuntimeErrorr~   r   r   r   
signaturesrd   rw   raisess   &  r   test_disabled_compilation(TestDispatcher.test_disabled_compilation  s    		 
	 	L!|,,KK
# -V--.0FGS^^,a0 -,s   B11C	c                T   \        R R.4      R 4       pV P                  \        4      ;_uu_ 4       pVP                  R4       RRR4       V P	                  \        XP                  4      R4       V P	                  \        VP                  4      ^4       R#   + '       g   i     L\; i)r   r   c                     V # r   r   r   s   &r   rw   BTestDispatcher.test_disabled_compilation_through_list.<locals>.foo  ry   r   z(complex64,)Nr   )	r   r   r   r   r~   r   r   r   r   r   s   &  r   &test_disabled_compilation_through_list5TestDispatcher.test_disabled_compilation_through_list  s    	lJ'	(	 
)	 |,,KK' -V--.0FGS^^,a0 -,s   BB'	c                ,  a \        R .4      R 4       o\         V3R l4       pV P                  \        P                  4      ;_uu_ 4       pV! 4        RRR4       RpV P	                  \        XP                  4      V4       R#   + '       g   i     L9; i)z(intp,)c                     V # r   r   r   s   &r   rw   ATestDispatcher.test_disabled_compilation_nested_call.<locals>.foo$  ry   r   c                  P   < S ! ^4       S ! \         P                  ! ^4      4       R# r   )r>   rG   )rw   s   r   r{   ATestDispatcher.test_disabled_compilation_nested_call.<locals>.bar(  s    F
Or   Nz?.*Invalid use of.*with parameters \(array\(float64, 1d, C\)\).*)r   r   r
   TypingErrorr   r   r   )rd   r{   r   mrw   s   &   @r   %test_disabled_compilation_nested_call4TestDispatcher.test_disabled_compilation_nested_call#  s    	i[		 
	 
	 
	 v1122fE 3 OV--.2	 32s   
BB	c                  a R pRpV P                  \        4      ;_uu_ 4       p\        P                  ! . 4       RRR4       V P	                  V\        XP                  4      4       \        RR7      ! V4      oV P                  S! . 4      . 4       \        RR7      ! V4      pV P                  \        4      ;_uu_ 4       pV! . 4       RRR4       V P	                  V\        VP                  4      4       \        RR7      V3R l4       pV P                  V! 4       . 4       VP                  P                  4       w  pV P                  \        VP                  4      ^4       R#   + '       g   i     EL4; i  + '       g   i     L; i)z
Failure in computing the fingerprint cannot affect a nopython=False
function.  On the other hand, with nopython=True, a ValueError should
be raised to report the failure with fingerprint.
c                     V # r   r   r   s   &r   rw   4TestDispatcher.test_fingerprint_failure.<locals>.foo9  r8   r   z(cannot compute fingerprint of empty listNTr   rY   c                  T   < \        4        . p \        ^
4       F  pS! V 4      p K  	  V # )
   )objectr   )r   r   objmode_foos     r   r{   4TestDispatcher.test_fingerprint_failure.<locals>.barK  s)    HA2YN Hr   )r   
ValueErrorr   compute_fingerprintr   r   r   r   r~   r   r   r   lifted)rd   rw   errmsgr   
strict_foor{   r   r   s   &      @r   test_fingerprint_failure'TestDispatcher.test_fingerprint_failure3  s&   	 <z**f++B/ +fc&"2"2344(-R"-$',
z**frN +fc&"2"234 
d		 
	 	#}}##%RYY+1 +** +*s   E&	E:&E7	:F
	c                   \        RR7      R 4       pV P                  V! ^4      ^4       \        P                  p\        P                  P                  4        \        V4      p\        P                  ! V4      pV P                  V^,           \        V4      4       \        P                  ! V4      pV P                  V^,           \        V4      4       V P                  W4       \        V4      p??V P                  V^,           \        V4      4       \        P                  ! V4      pV P                  V\        V4      4       \        P                  ! V4      p?\        P                  P                  4        V P                  V\        V4      4       \        P                  ! V4       V P                  V! 4       R4       R# )z*
Test serialization of Dispatcher objects
TrY   c                     V ^,           # r   r   r   s   &r   rw   .TestDispatcher.test_serialization.<locals>.foo\  r   r   N)r   r~   r   _memo_recentclearr   pickledumpsloadsassertIsidweakrefref)	rd   rw   memo	memo_sizeserialized_foofoo_rebuiltid_orignew_foor  s	   &        r   test_serialization!TestDispatcher.test_serializationX  sW    
d		 
	 	Q#   "I	  c*QD	2 ll>2QD	2c' [/QD	2,,~."W+. kk'"  "CI. 	^$ceT"r   zUnaligned loads unsupportedc                  a	a
aa R  o	\        RR7      ! S	4      o
^@o\        \        P                  ! S4      4      o\        P                  p\        P
                  ! 4       P                  V! 4       P                  ,          p\        P                  ! SV,          ^,           VR7      pVRR P                  \        P
                  4      P                  SS4      pVR,          P                  \        P
                  4      P                  SS4      pVP                  pVP                  pV	V
VV3R lpV! RV4       V! RV4       V! R	V4       V! R
V4       R# )c                 B    \         P                  P                  V ^4      # r   r>   linalgmatrix_powerr   s   &r   rw   :TestDispatcher.test_misaligned_array_dispatch.<locals>.foo  s    99))!Q//r   TrY   rF   Nr   NNc                    < \         P                  ! S\         P                  R 7      P                  SS4      VR&   S! V4      pS! V4      p\         P                  P                  W#4       R# rF   NNNNr#  r>   arange
complex128reshapetestingassert_allcloser@   rI   r`   gotrw   jitfoonrs   &&  r   re   <TestDispatcher.test_misaligned_array_dispatch.<locals>.check  sL    ii7??1EAdG1vH)CJJ&&x5r   C_contig_alignedF_contig_alignedC_contig_misalignedF_contig_misalignedr   intr>   sqrtint8r&  itemsizer%  viewr'  Trd   dtcounttmpr0  r2  r1  r3  re   rw   r,  r-  r.  s   &        @@@@r   test_misaligned_array_dispatch-TestDispatcher.test_misaligned_array_dispatch  s   	0 d#C(
OWW((BDMM9iiE	AR0 s8==7??1E!"gll2==9AA!QG+--133	6 	6 	 "23 "23#%89#%89r   c                  a	a
aa R  o	\        RR7      ! S	4      o
^@o\        \        P                  ! S4      4      o\        P                  p\        P
                  ! 4       P                  V! 4       P                  ,          p\        P                  ! SV,          ^,           VR7      pVRR P                  \        P
                  4      P                  SS4      pVR,          P                  \        P
                  4      P                  SS4      pVP                  pVP                  pRV	V
VV3R llpV! RVRR7       V! R	VRR7       V! R
VRR7       V! RVRR7       R# )c                 .    \         P                  ! V 4      # r   )r>   sumr   s   &r   rw   ?TestDispatcher.test_immutability_in_array_dispatch.<locals>.foo  s    66!9r   TrY   rF   Nr  c                 
  < \         P                  ! S\         P                  R 7      P                  SS4      VR&   V'       d   RVP                  n        S! V4      pS! V4      p\         P                  P                  W44       R# )rF   FNr"  )r>   r%  r&  r'  flags	writeabler(  r)  )	r@   rI   disable_write_bitr`   r+  rw   r,  r-  r.  s	   &&&  r   re   ATestDispatcher.test_immutability_in_array_dispatch.<locals>.check  s[    ii7??1EAdG $)!1vH)CJJ&&x5r   r0  )rI  r1  r2  r3  r4  )Fr5  r<  s   &        @@@@r   #test_immutability_in_array_dispatch2TestDispatcher.test_immutability_in_array_dispatch  s   	 d#C(
OWW((BDMM9iiE	AR0 s8==7??1E!"gll2==9AA!QG+--133	6 	6 	 "2dK "2dK#%8 $	&#%8 $	&r   c                  a a
aaa R  o
\        RR7      ! S
4      oV 3R lpRo^o\        P                  p\        P                  ! 4       P                  V! 4       P                  ,          p\        P
                  ! SV,          ^,           VR7      pVRR P                  \        P                  4      P                  SSSSSS4      pV! VRR4       VR,          P                  \        P                  4      P                  SSSSSS4      pV! VRR	4       VP                  pV! VR
R4       VP                  pV! VR
R	4       V
VVV3R lp	V	! RV4       V	! RV4       V	! RV4       V	! RV4       R# )c                 P    \         P                  P                  V R,          ^4      # )r   )r   r   r   r   r#  r#  r  r   s   &r   rw   ITestDispatcher.test_misaligned_high_dimension_array_dispatch.<locals>.foo  s    99))!,<*=qAAr   TrY   c                   < SP                  V P                  P                  V4       VR 8X  d'   SP                  V P                  P                  R4       VR8X  d)   SP                  V P                  P                  R4       R# R# )CTFN)r~   rG  alignedc_contiguousf_contiguous)arrlayoutrS  rd   s   &&&r   check_propertiesVTestDispatcher.test_misaligned_high_dimension_array_dispatch.<locals>.check_properties  sd    SYY..8}  !7!7>}  !7!7> r   i  rF   NrQ  r  FrR  c                    < \         P                  ! S\         P                  R 7      P                  SSSSSS4      VR&   S! V4      pS! V4      p\         P                  P                  W#4       R# r!  r$  r*  s   &&  r   re   KTestDispatcher.test_misaligned_high_dimension_array_dispatch.<locals>.check  sV    ii71aAq) dG1vH)CJJ&&x5r   r3  r0  r1  r2  r4  )	r   r>   r8  r&  r9  r%  r:  r'  r;  )rd   rX  r=  r>  r?  r0  r2  r1  r3  re   rw   r,  r-  r.  s   f         @@@@r   -test_misaligned_high_dimension_array_dispatch<TestDispatcher.test_misaligned_high_dimension_array_dispatch  sN   	B d#C(	? WW((BDMM9iiE	AR0 s8==7GAq!Q1% 	)35!"gll2==9GAq!Q1% 	,c59+--)35133,c59	6 	6 	#%89 "23 "23#%89r   c                R   R  p\        RR7      ! V4      pV! \        P                  ! R4      4       V! \        P                  ! ^
4      4       V! \        P                  ! R4      4       V P                  \        VP                  4      ^4       \        P                  3\        P                  3\        P                  3.pV P                  VP                  V4       \        \        P                  3.RR7      ! V4      pV! \        P                  ! R4      4       V! \        P                  ! ^
4      4       V! \        P                  ! R4      4       V P                  \        VP                  4      ^4       \        P                  3.pV P                  VP                  V4       R# )c                     V # r   r   r   s   &r   rw   @TestDispatcher.test_dispatch_recompiles_for_scalars.<locals>.foo  r8   r   TrY   FNy      ?       @)	r   r>   r&  r   bool_r~   r   r   r	   )rd   rw   r,  expected_sigss   &   r   $test_dispatch_recompiles_for_scalars3TestDispatcher.test_dispatch_recompiles_for_scalars	  s-   	 d#C(r}}V$%rxx|rxxV../3**,u{{nu{{nM**M: u'')*T:3?r}}V$%rxx|rxxV../3**,-**M:r   c                f   \        R R7      R 4       pV P                  \        4      ;_uu_ 4       p\        V4       RRR4       \        XP                  4      pV P                  RV4       V P                  RV4       V P                  RV4       V P                  \        4      ;_uu_ 4       p\        \        4       RRR4       \        VP                  4      pV P                  RV4       V P                  \        \        4       V4       R#   + '       g   i     L; i  + '       g   i     Ll; i)TrY   c                     V # r   r   r   s   &r   rw   ITestDispatcher.test_dispatcher_raises_for_invalid_decoration.<locals>.foo(  ry   r   Nz8A jit decorator was called on an already jitted functionrw   z.py_funcz&The decorated object is not a function)r   r   rT   r   r   r   rX   rU   )rd   rw   r   err_msgs   &   r   -test_dispatcher_raises_for_invalid_decoration<TestDispatcher.test_dispatcher_raises_for_invalid_decoration%  s     
d		 
	 y))VH *f&&'F	QeW%j'*y))VM *f&&'>Hh(73 *) *)s   D,D D	 D0	r   N)rj   rk   rl   rm   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r   unittestskipIf
_is_armv7lr@  rK  r\  rc  ri  ro   rp   rq   s   @r   rt   rt   j   s     - L$;*!0$5L3$3
113 #,J+#Z __Z!>?$: @ $:L __Z!>?&& @&&P __Z!>?/: @ /:b;84 4r   rt   c                   6   a  ] tR tRt o RtR tR tR tRtV t	R# )TestSignatureHandlingi;  z4
Test support for various parameter passing styles.
c           	     .   V P                  \        4      w  rV! ^^
^R7       V! ^^^
4       V! ^^^
R7       V P                  \        VP                  4      ^4       V P                  \        4      ;_uu_ 4       pV! ^^^^R7       RRR4       V P                  R\        XP                  4      4       V P                  \        4      ;_uu_ 4       pV! 4        RRR4       V P                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! ^^^R7       RRR4       V P                  R\        VP                  4      4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L]; i)	z/
Test passing named arguments to a dispatcher.
r#   r   r"   r   r#   N%too many arguments: expected 3, got 4z'not enough arguments: expected 3, got 0r   zmissing argument 'z')
rh   r$   r~   r   r   r   rT   r   r   r   rd   rb   re   r   s   &   r   test_named_args%TestSignatureHandling.test_named_args@  s!    $$V,a2aBQ"Q[[)1-y))Raa1 *=",,'	)y))RC *?",,'	)y))RaaL *,c",,.?@ *) *) *)s$   :EE1#FE.	1F	F	c           	     >   V P                  \        4      w  rV! ^^
^R7       V! ^^^
4       V! ^^^
R7       V! ^^
R7       V! ^^4       V! ^^R7       V! ^4       V! ^R7       V P                  \        4      ;_uu_ 4       pV! ^^^^R7       RRR4       V P	                  R\        XP                  4      4       V P                  \        4      ;_uu_ 4       pV! 4        RRR4       V P	                  R	\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! ^^R7       RRR4       V P	                  R
\        VP                  4      4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L]; i)z/
Test omitting arguments with a default value.
rq  r"   r#   r   r   rr  Nrs  z0not enough arguments: expected at least 1, got 0zmissing argument 'x')rh   r'   r   rT   r   r   r   ru  s   &   r   test_default_args'TestSignatureHandling.test_default_argsW  s/    $$_5a2aBQ"a2aQa
y))Raa1 *=",,'	)y))RC *H",,'	)y))RQK *,c",,.?@ *) *) *)s$   E&E9,F&E6	9F		F	c                F   V P                  \        4      w  rV! ^4       V! ^^4       V! ^^^4       V! ^^^^4       V! ^^^^^4       V! ^R7       V! ^^R7       V! ^^R7       V P                  \        4      ;_uu_ 4       pV! ^^^R7       RRR4       V P	                  R\        XP                  4      4       V P                  \        4      ;_uu_ 4       pV! ^^^R7       RRR4       V P	                  R\        VP                  4      4       V P                  \        4      ;_uu_ 4       pV! ^^R7       RRR4       V P	                  R\        VP                  4      4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L]; i)z:
Test a compiled function with starargs in the signature.
r   r   rt  Nz!some keyword arguments unexpectedry  )rh   r)   r   rT   r   r   r   ru  s   &   r   test_star_args$TestSignatureHandling.test_star_argsr  s2    $$]3aaaAaAqaAq!
Qa1y))RaaL *93r||;LMy))RaaL *93r||;LMy))Ra1I *93r||;LM *) *) *)s$   E*E=0F*E:	=F	F 	r   N)
rj   rk   rl   rm   __doc__rv  rz  r}  ro   rp   rq   s   @r   ro  ro  ;  s"     A.A6N Nr   ro  c                   ,    ] tR tRtRt]! RR7      tRtR# )TestSignatureHandlingObjectModei  z4
Sams as TestSignatureHandling, but in object mode.
Tr   r   N)rj   rk   rl   rm   r  rn   rg   ro   r   r   r   r  r    s     T"Hr   r  c                      a  ] tR tRt o R tR tR tR tRR ltR t	R t
R	 tR
 t]P                  ! ]RJ R4      ]P                  ! ]RJ R4      R 4       4       tR tR tRtV tR# )TestDispatcherMethodsi  c                  a ^o\         V3R l4       pV P                  V! ^4      ^4       V P                  V! R4      R4       V P                  \        VP                  4      ^4       ^oV P                  V! ^4      ^4       VP                  4        V P                  \        VP                  4      ^4       V P                  V! ^4      ^4       V P                  V! R4      R4       R# )r   c                    < V S,           # r   r   r   closures   &r   rw   1TestDispatcherMethods.test_recompile.<locals>.foo      w;r   r   r   r   N)r   r]   r~   r   r   	recompilerd   rw   r  s   & @r   test_recompile$TestDispatcherMethods.test_recompile  s    		 
	A*C#.S^^,a0A*S^^,a0A*C#.r   c                H  a ^o\        R4      V3R l4       pV P                  V! ^4      ^4       V P                  V! R4      ^4       ^oV P                  V! ^4      ^4       VP                  4        V P                  V! ^4      ^4       V P                  V! R4      ^4       R# )r   zint32(int32)c                    < V S,           # r   r   r  s   &r   rw   <TestDispatcherMethods.test_recompile_signatures.<locals>.foo  r  r   r   N)r   r]   r  r  s   & @r   test_recompile_signatures/TestDispatcherMethods.test_recompile_signatures  s    	^		 
	A*C!,A*A*C!,r   c                D   \         R  4       pV! ^^4       V! R^4       V! RR4       VP                  4       pV P                  \        V4      ^4       VP	                  4        F9  pV P                  RV4       V P                  RV4       V P                  RV4       K;  	  R# )c                     W,           # r   r   explicit_arg1explicit_arg2s   &&r   rw   4TestDispatcherMethods.test_inspect_llvm.<locals>.foo       00r   r   rw   r  r  N)r   inspect_llvmr~   r   r   r   )rd   rw   llvmsllvm_bcs   &   r   test_inspect_llvm'TestDispatcherMethods.test_inspect_llvm  s    		1 
	1 	Aq	CC   "UQ' ||~GMM%) MM/73MM/73 &r   c                    \         R  4       pV! ^^4       V! R^4       V! RR4       VP                  4       pV P                  \        V4      ^4       VP	                  4        F  pV P                  RV9   4       K  	  R# )c                     W,           # r   r   r  s   &&r   rw   3TestDispatcherMethods.test_inspect_asm.<locals>.foo  r  r   r   rw   N)r   inspect_asmr~   r   r   
assertTrue)rd   rw   asmsasms   &   r   test_inspect_asm&TestDispatcherMethods.test_inspect_asm  su    		1 
	1 	Aq	CC  TA& ;;=COOESL) !r   c                @   V'       d   R P                  \        V4      V4      p\        P                  R^4      ^ ,          p\        V4      pRP                  VVV4      pV P	                  \        V4      V4       V P                  \        VP                  4      4       R# )z{}{}.z^digraph "CFG for \'_ZN{}{}{}N)	formatr   rj   splitr   r   r  callabledisplay)rd   cfgr   module_name
module_lenprefixs   &&&   r   _check_cfg_display(TestDispatcherMethods._check_cfg_display  s~    mmCL':GnnS!,Q/%
1889C9DF 	S6* 	-.r   c                   \         R  4       p\        P                  ! ^4      p\        P                  ! R4      p\        P                  ! R4      pV! V4       V! V4       V! V4       VP                  4       pV P	                  \        V4      ^4       VP                  4       w  rgpV P	                  \        WgV.4      \        \        R W#V.4      4      4       VP                  4        F  p	V P                  V	4       K  	  V P	                  \        \        VP                  4       4      4      ^4       VP                  VP                  ^ ,          R7      p	V P                  V	4       R# )c                 "    V P                  4       # r   rD  	the_arrays   &r   rw   3TestDispatcherMethods.test_inspect_cfg.<locals>.foo      ==?"r   c                     \        V 4      3# r   )r   r   s   &r   <lambda>8TestDispatcherMethods.test_inspect_cfg.<locals>.<lambda>  s
    F1I<r   	signatureNr   r   r   r   r   )r   r>   rG   inspect_cfgr~   r   keyssetmapr   r  listr   )
rd   rw   a1a2a3cfgss1s2s3r  s
   &         r   test_inspect_cfg&TestDispatcherMethods.test_inspect_cfg  s!    
	# 
	# WWQZWWV_WWYBBB   	TA& yy{bb\*S!7""FG	I ;;=C##C( !T$++-0115 ooq(9o:$r   c                @   \         R  4       p\        P                  ! ^4      p\        P                  ! R4      p\        P                  ! R4      pV! V4       V! V4       V! V4       VP                  VP                  ^ ,          RR7      pV P                  VRR7       R# )c                 "    V P                  4       # r   r  r  s   &r   rw   GTestDispatcherMethods.test_inspect_cfg_with_python_wrapper.<locals>.foo  r  r   python)r  show_wrappercpython)r   Nr  r  )r   r>   rG   r  r   r  )rd   rw   r  r  r  r  s   &     r   $test_inspect_cfg_with_python_wrapper:TestDispatcherMethods.test_inspect_cfg_with_python_wrapper  s     
	# 
	# WWQZWWV_WWYBBB ooq(9+3  5Y7r   c                z   \         R  4       pV! ^^4       VP                  \        4       4       \        VP                  VP
                  ^ ,          ,          P                  4      p\        4       ;_uu_ 4       pVP                  4        RRR4       VXP                  4       9   g   Q hR#   + '       g   i     L); i)c                     W,           # r   r   r   s   &&r   rw   5TestDispatcherMethods.test_inspect_types.<locals>.foo(  r   r   N)	r   inspect_typesr   r   r   r   type_annotationr   getvalue)rd   rw   r`   outs   &   r   test_inspect_types(TestDispatcherMethods.test_inspect_types'  s    		 
	 	Aq	(*% s}}S^^A%67GGH# 3<<>))) s   8B**B:	c                   \         R  4       pV! ^4       V! R4       \        4       ;_uu_ 4       pVP                  4        RRR4       \        4       ;_uu_ 4       pVP                  VP                  ^ ,          R7       RRR4       \        4       ;_uu_ 4       pVP                  VP                  ^,          R7       RRR4       V P	                  XP                  4       XP                  4       XP                  4       ,           4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L{; i)c                     V ^,           # r   r   r   s   &r   rw   DTestDispatcherMethods.test_inspect_types_with_signature.<locals>.foo7  r   r   r   Nr  )r   r   r  r   r~   r  )rd   rw   totalfirstseconds   &    r   !test_inspect_types_with_signature7TestDispatcherMethods.test_inspect_types_with_signature6  s    		 
	 	AC%  %q(9:  &q(9:  	)5>>+;foo>O+OP   s#   D	$D$D/	D	D,	/D?	Nz#please install the 'jinja2' packagez%please install the 'pygments' packagec                R   \         R  4       pV! ^^4       \        4       ;_uu_ 4        VP                  RR7      pRRR4       XP                  P	                  4        F:  w  r4RpVR,           F  pRV^,          9   g   K  RpK  	  V P                  V4       K<  	  V P                  \        4      ;_uu_ 4       pVP                  \        4       RR7       RRR4       V P                  R\        XP                  4      4       R#   + '       g   i     L; i  + '       g   i     LJ; i)	c                     W,           # r   r   r   s   &&r   rw   <TestDispatcherMethods.test_inspect_types_pretty.<locals>.fooL  r   r   T)prettyNFpygments_linesspan)filer  z$`file` must be None if `pretty=True`)r   r   r  annitemsr  r   r   r   r   r   r   )rd   rw   r  kv
span_foundliner   s   &       r   test_inspect_types_pretty/TestDispatcherMethods.test_inspect_types_prettyI  s     
	 
	 	Aq	 ##4#0C  GGMMODAJ*++T!W$!%J , OOJ' $ z**f8:d; + 	<&**+	-  +*s   D8DD	D&	c                   a \         R  4       oS! ^4       S! R4       \        \        P                  ! V3R lSP                   4       4      4      pSP                  4       pV P                  W4       R# )c                     V ^,           # r   r   r   s   &r   rw   ;TestDispatcherMethods.test_get_annotation_info.<locals>.foof  r   r   g?c              3   b   <"   T F$  pSP                  V4      P                  4       x  K&  	  R # 5ir   )get_annotation_infor  )rA   r   rw   s   & r   rC   ATestDispatcherMethods.test_get_annotation_info.<locals>.<genexpr>m  s0      ,E5C -0,C,CA,F,L,L,N,N5Cs   ,/N)r   rn   r   from_iterabler   r  r~   )rd   r`   ra   rw   s   &  @r   test_get_annotation_info.TestDispatcherMethods.test_get_annotation_infoe  sm    		 
	 	AC++ ,E58^^,E E F((**r   c                   R p\        V4      p\        P                  ! R..4      p\        P                  ! RR.RR..RR7      p\        P                  ! RR.RR..RR7      pV! V^^ 4      pV! V^^ 4      pV P                  RV! V^ ^ 4      4       V! V^^ 4      pV! V^^ 4      p	V P                  Wh4       V P                  Wy4       R	# )
a  
This test an issue with the dispatcher when an array that is both
C and F contiguous is supplied as the first signature.
The dispatcher checks for F contiguous first but the compiler checks
for C contiguous first. This results in an C contiguous code inserted
as F contiguous function.
c                     WV3,          # r   r   )Ar   js   &&&r   rc   KTestDispatcherMethods.test_issue_with_array_layout_conflict.<locals>.pyfuncz  s    T7Nr   r   g        r   g      @rQ  )orderrR  N)r   r>   arrayr~   )
rd   rc   cfuncary_c_and_fary_cary_fexp_cexp_fgot_cgot_fs
   &         r   %test_issue_with_array_layout_conflict;TestDispatcherMethods.test_issue_with_array_layout_conflictr  s    	 Fhhv&2r(RH-S92r(RH-S9ua#ua#U;156eQ"eQ"&&r   r   ) )rj   rk   rl   rm   r  r  r  r  r  r  r  r  r  rk  rl  jinja2pygmentsr  r  r  ro   rp   rq   s   @r   r  r    s     /$- 40*(/ %D8**Q& __Vt^%JK__X%'NO- P L-4+' 'r   r  c                   8   a  ] tR tRt o R tR tR tR tRtV t	R# ) TestDispatcherFunctionBoundariesi  c                  aa \        R R7      R 4       o\        R R7      R 4       o\        R R7      VV3R l4       p^R\        P                  ! ^
4      .pV Uu. uF  q3^,           NK  	  pp\        W$4       F  w  rVV P	                  V! V4      V4       K  	  \        W$4       F  w  rVV P	                  S! SV4      V4       K   	  R# u upi )TrY   c                     V ^,           # r   r   r   s   &r   add1JTestDispatcherFunctionBoundaries.test_pass_dispatcher_as_arg.<locals>.add1  r   r   c                     V ! V4      # r   r   )fnr   s   &&r   r{   ITestDispatcherFunctionBoundaries.test_pass_dispatcher_as_arg.<locals>.bar  s    a5Lr   c                    < S! SV 4      # r   r   )r   r  r{   s   &r   rw   ITestDispatcherFunctionBoundaries.test_pass_dispatcher_as_arg.<locals>.foo  s    tQ<r   g333333&@N)r   r>   r%  zipr]   )	rd   rw   inputsr   expected_resultsargexpectr  r{   s	   &      @@r   test_pass_dispatcher_as_arg<TestDispatcherFunctionBoundaries.test_pass_dispatcher_as_arg  s    	d		 
	 
d		 
	 
d		  
	  T299R=)+126aEE62v8KC##CHf5 9 v8KC##CcNF; 9 3s   Cc                   \        R R7      R 4       pV! . RO\        R 4      R7      pV P                  V^4       V! \        \        \	        ^4      \	        ^4      RRR	1,          4      4      \        R 4      R7      pV P                  VR
4       V! \        \        \	        ^4      \	        ^4      RRR	1,          4      4      \        R 4      R7      pV P                  VR4       R# )TrY   c                 ^    V ^ ,          pV R,           F  pV! W#4      pV^ 8  g   K  TpK  	  V# )r   r  r   )seqcmpfnr?  eachcmpvals   &&   r   maximumPTestDispatcherFunctionBoundaries.test_dispatcher_as_arg_usecase.<locals>.maximum  s8    a&CBs)A:C   Jr   c                     W,
          # r   r   r   s   &&r   r  QTestDispatcherFunctionBoundaries.test_dispatcher_as_arg_usecase.<locals>.<lambda>  s    15r   )r*  Nc                 0    V ^ ,          V^ ,          ,
          # r   r   r   s   &&r   r  r0        QqTAaD[r   c                 0    V ^,          V^,          ,
          # r   r   r   s   &&r   r  r0    r3  r   )r            r4  )r7  r   )r   r7  )r   r~   r  r   r   )rd   r-  r+  s   &  r   test_dispatcher_as_arg_usecase?TestDispatcherFunctionBoundaries.test_dispatcher_as_arg_usecase  s    	d		 
	 l#.@*ABa d3uQxq$B$89 89;f%d3uQxq$B$89 89;f%r   c                r    \        R R7      R 4       p\        R 4      pV P                  V! V4      V4       R# )TrY   c                     V # r   r   )r  s   &r   rw   RTestDispatcherFunctionBoundaries.test_dispatcher_can_return_to_python.<locals>.foo  s    Ir   c                     V # r   r   r   s   &r   r  WTestDispatcherFunctionBoundaries.test_dispatcher_can_return_to_python.<locals>.<lambda>  s    1r   Nr}   )rd   rw   r  s   &  r   $test_dispatcher_can_return_to_pythonETestDispatcherFunctionBoundaries.test_dispatcher_can_return_to_python  s9    	d		 
	 R"%r   c                  a \        R R7      R 4       o\        R R7      V3R l4       p\        R R7      V3R l4       p\        R R7      R 4       pV P                  V! SW3^4      R4       V P                  V! SSS.^4      R4       R# )	TrY   c                     V ^,           # r   r   r   s   &r   oneMTestDispatcherFunctionBoundaries.test_dispatcher_in_sequence_arg.<locals>.one  r   r   c                     < S! S! V 4      4      # r   r   r   rC  s   &r   twoMTestDispatcherFunctionBoundaries.test_dispatcher_in_sequence_arg.<locals>.two  s    s1v;r   c                 ,   < S! S! S! V 4      4      4      # r   r   rF  s   &r   threeOTestDispatcherFunctionBoundaries.test_dispatcher_in_sequence_arg.<locals>.three  s    s3q6{##r   c                 Z    V ^ ,          ! V4      V ^,          ! V4      V ^,          ! V4      3# r2  r   )fnsr   s   &&r   choosePTestDispatcherFunctionBoundaries.test_dispatcher_in_sequence_arg.<locals>.choose  s'    q6!9c!fQiQ22r   N)r5  r6  r7  )r5  r5  r5  r}   )rd   rG  rJ  rN  rC  s   &   @r   test_dispatcher_in_sequence_arg@TestDispatcherFunctionBoundaries.test_dispatcher_in_sequence_arg  s    	d		 
	 
d		 
	 
d		$ 
	$ 
d		3 
	3 	c 115yAc33Y?r   r   N)
rj   rk   rl   rm   r%  r8  r?  rP  ro   rp   rq   s   @r   r  r    s      <2&&&@ @r   r  c                   ,   a  ] tR tRt o R tR tRtV tR# )TestBoxingDefaultErrori  c                \   R  p\         P                  ! R4      3p\        V4      ! V4      P                  V,          pV P	                  \
        4      ;_uu_ 4       pVP                  R4       RRR4       V P                  \        XP                  4      R4       R#   + '       g   i     L7; i)c                     R # r   r   r   s   &r   rw   <TestBoxingDefaultError.test_unbox_runtime_error.<locals>.foo  s    r   
dummy_typeNzcan't unbox dummy_type type)
r	   Dummyr   r   r   rT   r   r~   r   r   )rd   rw   argtyscresr   s   &    r   test_unbox_runtime_error/TestBoxingDefaultError.test_unbox_runtime_error  s    	++l+- F|C **62y))V T" * 	V--.0MN	 *)s   BB+	c                    \         R  4       pV P                  \        4      ;_uu_ 4       pV! 4        RRR4       RpV P                  \	        XP
                  4      V4       R#   + '       g   i     L9; i)c                      \         # r   )rk  r   r   r   rw   :TestBoxingDefaultError.test_box_runtime_error.<locals>.foo  s    Or   Nz/cannot convert native Module.* to Python object)r   r   rT   r   r   r   )rd   rw   r   pats   &   r   test_box_runtime_error-TestBoxingDefaultError.test_box_runtime_error  sZ    		 
	y))VE *?V--.4 *)s   A##A3	r   N)rj   rk   rl   rm   r[  ra  ro   rp   rq   s   @r   rS  rS    s     O5 5r   rS  c                   <   a  ] tR tRt o RtR tR tR tR tRt	V t
R# )	TestNoRetryFailedSignaturei  z?Test that failed-to-compile signatures are not recompiled.
    c                   VP                   pV P                  \        VP                  4      ^ 4       V P	                  \
        P                  4      ;_uu_ 4        V! ^4       RRR4       V P                  \        VP                  4      ^4       V P	                  \
        P                  4      ;_uu_ 4        V! ^4       RRR4       V P                  \        VP                  4      ^4       V P	                  \
        P                  4      ;_uu_ 4        V! R4       RRR4       V P                  \        VP                  4      ^4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L]; i)r   Nr   )	_compilerr~   r   _failed_cacher   r
   r   )rd   funcfcoms   && r   run_test#TestNoRetryFailedSignature.run_test  s    ~~T//0!4v1122G 3T//0!4v1122G 3T//0!4v1122I 3T//0!4 32 32 32s$   	E6	E	E1E	E.	1F	c                L    \        R R7      R 4       pV P                  V4       R# )TrY   c                     V ^ ,          # r2  r   r   s   &r   rw   8TestNoRetryFailedSignature.test_direct_call.<locals>.foo
      Q4Kr   Nr   rj  r   s   & r   test_direct_call+TestNoRetryFailedSignature.test_direct_call	  s'    	d		 
	 	cr   c                   aa \        R R7      R 4       o\        R R7      V3R l4       o\        R R7      VV3R l4       pV P                  V4       R# )TrY   c                     V ^ ,          # r2  r   r   s   &r   r{   8TestNoRetryFailedSignature.test_nested_call.<locals>.bar  ro  r   c                    < S! V 4       R # r   r   )r   r{   s   &r   foobar;TestNoRetryFailedSignature.test_nested_call.<locals>.foobar  s
    Fr   c                 .   < S! V 4      S! V 4      ,           # r   r   )r   r{   rw  s   &r   rw   8TestNoRetryFailedSignature.test_nested_call.<locals>.foo  s    q6F1I%%r   Nrp  )rd   rw   r{   rw  s   & @@r   test_nested_call+TestNoRetryFailedSignature.test_nested_call  sZ    	d		 
	 
d		 
	 
d		& 
	& 	cr   c                   a  V 3R  lpV! RR4      pV! RR4      pS P                  V^4       S P                  V^4       R# )c                   <aa	a
 ^
pR^ /o
R p\        V4      V
V3R l4       p\        RR7      R 4       pV3V	3R llo	S	! V3V,          4      p\        P                  ! ^4      pS'       dh   SP	                  \
        P                  4      ;_uu_ 4       pV! V^4       RRR4       SP                  R	\        XP                  4      4       S
R,          # V! V^4       S
R,          #   + '       g   i     LP; i)
r   cc                     Q R4       h)r   unreachabler   r   s   &r   triggerKTestNoRetryFailedSignature.test_error_count.<locals>.check.<locals>.trigger(  s    '-'qr   c                 p   < SR ;;,          ^,          uu&   S'       d   \         P                  ! R4      hR # )r  invoke_failedc                     V # r   r   r   s   &r   r  `TestNoRetryFailedSignature.test_error_count.<locals>.check.<locals>.ol_trigger.<locals>.<lambda>1  s    r   )r
   r   )r   counter
would_fails   &r   
ol_triggerNTestNoRetryFailedSignature.test_error_count.<locals>.check.<locals>.ol_trigger+  s-     ! ,,_==""r   TrY   c                     R # r   r   )r  r   s   &&r   identITestNoRetryFailedSignature.test_error_count.<locals>.check.<locals>.ident3  s    r   c                 v   <aa V R,          V RR uop\        RR7      VV3R l4       pV'       d	   S! W#4      # V# )r   NTrY   c                 N   < S! W4       V ^ ;;,          S! V4      ,          uu&   R# )r   Nr   )r  r   innertab_heads   &&r   assign`TestNoRetryFailedSignature.test_error_count.<locals>.check.<locals>.chain_assign.<locals>.assign:  s    #MFhqk)Fr   r4  r   )fsr  tab_tailr  r  chain_assigns   &f  @r   r  PTestNoRetryFailedSignature.test_error_count.<locals>.check.<locals>.chain_assign7  sE    %'VRW"(d#* $* '99!Mr   Nr  )
r   r   r>   rG   r   r
   r   r   r   r   )fieldr  r  r  r  r  r   r  r   r  r  rd   s   &f       @@r   re   :TestNoRetryFailedSignature.test_error_count.<locals>.check   s    
 AAhG( g# # $   (- " !'a0E''!*C&&v'9'9::f#qM ;os63C3C/DE
 3< c1 3< ;:s   
C%%C5	rI   Fr  TN)r~   )rd   re   ct_okct_bads   f   r   test_error_count+TestNoRetryFailedSignature.test_error_count  sE    .	 ` c5!sD! 	"#r   r   N)rj   rk   rl   rm   r  rj  rq  r{  r  ro   rp   rq   s   @r   rd  rd    s#     5 7$ 7$r   rd  c                     W,           # r   r   r   s   &&r   add_y1r  Y  	    5Lr   c                 2    Y'       d	   ^,           # ^,           # r   r   r   s   &&r   	add_ynoner  ^  s    QAr   c                     W,          # r   r   r   s   &&r   multr  c  r  r   c                     W! W 4      ,           # r   r   )r   rh  s   &&r   add_funcr  h  s    tAz>r   c                 B    V ! V4      V P                  V4      8X  g   Q hR # r   )r   )f1r#  s   &&r   _checkerr  m  s    c7bjjo%%%r   c                   8   a  ] tR tRt o R tR tR tR tRtV t	R# )$TestMultiprocessingDefaultParametersiq  c                &    \         P                  ! R 4      pR F\  pVP                  \        W3R7      pVP                  4        VP                  \        4       V P                  VP                  ^ 4       K^  	  R#   \         d
    \         p Lwi ; i)spawn)r   r^   N)r   r5  r6  )
multiprocessingget_contextAttributeErrorProcessr  r   r   _TEST_TIMEOUTr~   exitcode)rd   fcctxrI   ps   &&   r   run_fc_multiproc5TestMultiprocessingDefaultParameters.run_fc_multiprocr  sv    	"!--g6C A82(;AGGIFF=!QZZ+	   	"!C	"s   A< <BBc                0    V P                  \        4       R# )zTests issue #4888N)r  r  rd   s   &r   test_int_def_param7TestMultiprocessingDefaultParameters.test_int_def_param  s     	f%r   c                0    V P                  \        4       R# )z!Tests None as a default parameterNr  r  r  s   &r   test_none_def_param8TestMultiprocessingDefaultParameters.test_none_def_param       	h'r   c                0    V P                  \        4       R# )z'Tests a function as a default parameterNr  r  s   &r   test_function_def_param<TestMultiprocessingDefaultParameters.test_function_def_param  r  r   r   N)
rj   rk   rl   rm   r  r  r  r  ro   rp   rq   s   @r   r  r  q  s     ,"&
(
( (r   r  c                   *   a  ] tR tRt o RtR tRtV tR# )TestVectorizeDifferentTargetsi  zDTest that vectorize can be reapplied if the target is different
    c                v    \         R  4       p\        . RRR7      pV! V4       \        . RRR7      pV! V4       R# )c                     W,           # r   r   r   s   &&r   r    ?TestVectorizeDifferentTargets.test_cpu_vs_parallel.<locals>.add  r   r   Ncpu)identityr   parallel)r   r   )rd   r    custom_vectorizecustom_vectorize_2s   &   r   test_cpu_vs_parallel2TestVectorizeDifferentTargets.test_cpu_vs_parallel  sD    		 
	 %R$uE&rDL3r   r   N)rj   rk   rl   rm   r  r  ro   rp   rq   s   @r   r  r    s        r   r  __main__)r5  r6  )r5  )   r   r   )Br  platformr   r
  r  	itertoolsr   ior   numpyr>   numbar   r   r   r   
numba.corer	   r
   r   numba.tests.supportr   r   numba.np.numpy_supportr   numba.core.dispatcherr   numba.extendingr   r   r   numba.testing.mainr   _RUNNER_TIMEOUTrk  r  r  ImportErrorr  machinerm  r   r    r$   r'   r)   r4   r;   rV   rX   rt   ro  r  r  r  rS  rd  r  r  r  r  r  r  r  rj   mainr   r   r   <module>r     s           . . $  9 + , $ 9 : #% 8+

x 
N4X N4bLNH LN^#&; #y'H y'xJ@x J@Z5X.. 54a$!2!2 a$H         &(;8I8I (D H$5$5  $ zMMO U$  F
  Hs$   5F :F! 	FF!	F.-F.