+
    :i                         ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RI	t	^ RI
HtHt ^ RIHt ]P                  R 4       t ! R R]]	P"                  4      tR# )    N)StringIO)SerialMixincreate_temp_module)
dispatcherc              #      "    \        4       p\        P                  ! V4      pV P                  V4       Vx  V P	                  V4       R #   T P	                  X4       i ; i5iN)r   loggingStreamHandler
addHandlerremoveHandler)lbufferhandlers   &  Y/var/www/html/photoedit/myenv/lib/python3.14/site-packages/numba/tests/test_jit_module.pycaptured_logsr      sJ     !''/	W	  s   A"5A A"AA"c                   N   a  ] tR t^t o RtR tR tR tR tR t	R t
R tR	tV tR
# )TestJitModulez
from numba import jit_module

def inc(x):
    return x + 1

def add(x, y):
    return x + y

def inc_add(x):
    y = inc(x)
    return add(x, y)

import numpy as np
mean = np.mean

class Foo(object):
    pass

jit_module({jit_options})
c                   \        \        P                  4      p\        \        P                  4      p\        V P                  4      ;_uu_ 4       p\        P                  P                  VP                  4      pV P                  V\        P                  ^ ,          4       V P                  \        P                  R,          V4       V P                  VP                  \        P                  9   4       RRR4       V P                  \        P                  V4       V P                  \        P                  V4       R#   + '       g   i     LR; i)r   :   NNN)listsyspathdictmodulesr   source_linesosdirname__file__assertEqual
assertTrue__name__)selfsys_path_originalsys_modules_originaltest_moduletemp_module_dirs   &    r   test_create_temp_jitted_module,TestJitModule.test_create_temp_jitted_module1   s     N#CKK0 1 122k ggook.B.BCO_chhqk:SXXb\+<=OOK00CKK?@	 3 	#45&:; 32s   B$D>>E	c                    \        \        P                  4      p\        \        P                  4      p\        V P                  4      ;_uu_ 4        \        R 4      h  + '       g   i     R# ; i  \         dE    T P                  \        P                  X4       T P                  \        P                  X4        R# i ; i)zSomething went wrong!N)	r   r   r   r   r   r   r   
ValueErrorr   )r"   r#   r$   s   &  r   -test_create_temp_jitted_module_with_exception;TestJitModule.test_create_temp_jitted_module_with_exception=   s    	@ $SXX#'#4 #D$5$566 !899 766 	@SXX'89S[[*>?	@s+   AA1 AA.	(A1 .A1 1AC ?C c           	        \        V P                  4      ;_uu_ 4       pV P                  VP                  \        P
                  4       V P                  VP                  \        P
                  4       V P                  VP                  \        P
                  4       V P                  VP                  \        P                  J 4       V P                  \        P                  ! VP                  4      4       R Rr2V P                  VP                  V4      VP                  P                  V4      4       V P                  VP                  W#4      VP                  P                  W#4      4       V P                  VP                  V4      VP                  P                  V4      4       RRR4       R#   + '       g   i     R# ; i)g333333?gffffff@N)r   r   assertIsInstanceincr   
Dispatcheraddinc_addr    meannpinspectisclassFoor   py_func)r"   r%   xys   &   r   test_jit_moduleTestJitModule.test_jit_moduleH   s6    1 122k!!+//:3H3HI!!+//:3H3HI!!+"5"5z7L7LMOOK,,78OOGOOKOO<= q[__Q/(__44Q79[__Q2(__44Q:<[003(0088;= 3222s   F
F22G	c                    R RRRRRRR/p\        V P                  3/ VB ;_uu_ 4       pV P                  VP                  P                  V4       RRR4       R#   + '       g   i     R# ; i)nopythonTnogilFerror_modelnumpyboundscheckN)r   r   r   r/   targetoptions)r"   jit_optionsr%   s   &  r   test_jit_module_jit_options)TestJitModule.test_jit_module_jit_optionsY   sn    !4$g$e
   1 1 /"-/ /2=[__::KH/ / / /s   'AA+	c                &   R pRRRRRR/p\        RRV/VB ;_uu_ 4       pV P                  VP                  P                  V4       V P                  VP                  P                  RRR	RRR
RR/4       R
R
R
4       R
#   + '       g   i     R
# ; i)z
from numba import jit, jit_module

@jit(nogil=True, forceobj=True)
def inc(x):
    return x + 1

def add(x, y):
    return x + y

jit_module({jit_options})
r>   Tr@   rA   rB   Fr   r?   forceobjN )r   r   r1   rC   r/   )r"   r   rD   r%   s   &   r   $test_jit_module_jit_options_override2TestJitModule.test_jit_module_jit_options_overridec   s     "4$g$e   /\ /"-/ /2=[__::KH [__::%tZ+T:uFG/ / / /s   AA??B	c           
     ^  a \         P                  ! R 4      pVP                  \         P                  4       RRRR/p\	        V4      ;_uu_ 4       o\        V P                  3/ VB ;_uu_ 4       pSP                  4       oRRP                  VP                  4      RP                  V4      .pT P                  \        ;QJ d    V3R lV 4       F  '       d   K   R	M	  RM! V3R lV 4       4      4       R
R
R
4       R
R
R
4       R
#   + '       g   i     L; i  + '       g   i     R
# ; i)numba.core.decoratorsr>   Tr@   rA   zAuto decorating functionzfrom module {}zwith jit and options: {}c              3   ,   <"   T F	  qS9   x  K  	  R # 5ir   rI   ).0ilogss   & r   	<genexpr>?TestJitModule.test_jit_module_logging_output.<locals>.<genexpr>   s     #@x!Ixs   FN)r	   	getLoggersetLevelDEBUGr   r   r   getvalueformatr!   r    all)r"   loggerrD   r%   expectedrQ   s   &    @r   test_jit_module_logging_output,TestJitModule.test_jit_module_logging_output}   s    ""#:;&!4$g 6""d#D$5$5 3&13 36A}}6,33K4H4HI6==kJL #@x#@#@x#@ @A3 #"3 3 #""s+   D/A(D	D	6DDDD,	c           	        \         P                  ! R 4      pVP                  \         P                  4       \	        V4      ;_uu_ 4       p\        V P                  4      ;_uu_ 4        V P                  VP                  4       R4       RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)rM    N)	r	   rT   rU   INFOr   r   r   r   rW   )r"   rZ   rQ   s   &  r   test_jit_module_logging_level+TestJitModule.test_jit_module_logging_level   sw    ""#:;%6""d#D$5$566  "5 7 #"66 #""s$   	B-'!B	B-B*%B--B>	rI   N)r!   
__module____qualname____firstlineno__r   r'   r+   r;   rE   rJ   r\   ra   __static_attributes____classdictcell__)__classdict__s   @r   r   r      s8     L,
<	@="IG4B6 6    r   )r   r   r5   
contextlibrA   r4   r	   ior   unittestnumba.tests.supportr   r   
numba.corer   contextmanagerr   TestCaser   rI   ri   r   <module>rq      sS    	 
       ? ! ! !y6K!2!2 y6ri   