+
    :ir                     n   ^ 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	t	^ RI
t
^ RIt^ RIHt ^ RIHt ^ RIt^ RIHt ^ RIHt ^ RIHt ^ RIHtHtHtHtHt ^ RIH t  ^ RI!H"t" ^ R	I#H$t$H%t%H&t&H't'H(t(H)t)H*t*H+t+H,t,H-t- ^ R
I.H/t/  ^ RI0t0R t2]2! 4       t3Rt4]	Pj                  ! ]3]44      t6R t7R t8R t9R t:R t;R t< ! R R]$]%4      t=R t> ! R R]%4      t? ! R R]?4      t@ ! R R]@4      tA ! R R]@4      tB ! R R]@4      tC]+ ! R  R!]@4      4       tD ! R" R#]@4      tE ! R$ R%]?4      tF]* ! R& R']	PJ                  4      4       tGR( tH ! R) R*]	PJ                  4      tI ! R+ R,]?4      tJ ! R- R.]4      tK ! R/ R0]%4      tL ! R1 R2]%4      tM]NR38X  d   ]	P                  ! 4        R# R#   ]1 d    Rt0 EL#i ; i)4    N)Path)floor)njit)codegen)UserWideCacheLocatorZipCacheLocatorFunctionCacheInTreeCacheLocatorInTreeCacheLocatorFsAgnostic)NumbaWarning)parfor)
SerialMixinTestCasecapture_cache_logimport_dynamicoverride_configrun_in_new_process_cachingskip_if_typeguardskip_parfors_unsupportedtemp_directoryoverride_env_config)
cpu_targetc                  r   \        R 4      p \        P                  P                  V R4      p\        P                  ! V4       \        \        P                  P                  VR4      R4      ;_uu_ 4       pVP                  R4       RRR4       \        P                  ! VR4        \        \        P                  P                  VR4      R4      ;_uu_ 4       pVP                  R4       RRR4        \        P                  ! VR	4       \        P                  ! V4       R
#   + '       g   i     L; i  + '       g   i     LS; i  \         d2     \        P                  ! TR	4       \        P                  ! T4       R# i ; i  \        P                  ! TR	4       \        P                  ! T4       i ; i)
test_cachewritable_testwrite_okwtcheck1N@  write_forbiddencheck2i  FT)r   ospathjoinmkdiropenwritechmodshutilrmtreePermissionError)tempdirtest_dirfs      V/var/www/html/photoedit/myenv/lib/python3.14/site-packages/numba/tests/test_caching.pycheck_access_is_preventabler0   3   s#    \*GWo6HHHX	bggll8Z0$	7	71	 
8 HHXu "'',,x):;TBBaGGH C  	5!h% 
8	7
 CB   
5!h 	5!hsH   4D"&2E D5*E "D2	5E	 E FF FF /F6z9Cannot create a directory to which writes are preventablec                       R p \        V 4      V 3# )abcd)hash)cs    r/   constant_unicode_cacher5   W   s    A7A:    c                  z    \         p \        R R7      ! V 4      pV ! 4       w  r#V! 4       w  rEW$8X  g   Q hW58X  g   Q hR# TcacheN)r5   r   )pyfunccfuncexp_hvexp_strgot_hvgot_strs         r/   check_constant_unicode_cacherA   \   s@    #FtV$EhOFgOFr6   c                      R ^R^/# )ab rE   r6   r/   
dict_cacherF   e   s    Cr6   c                  b    \         p \        R R7      ! V 4      pV ! 4       pV! 4       pW#8X  g   Q hR# r8   )rF   r   r;   r<   expgots       r/   check_dict_cacherK   i   s.    FtV$E
(C
'C::r6   c               #   (   "   R F  p V x  K	  	  R# 5i)   N)rM         rE   )vs    r/   generator_cacherQ   q   s      s   c                      \         p \        R R7      ! V 4      p\        V ! 4       4      p\        V! 4       4      pW#8X  g   Q hR# r8   )rQ   r   listrH   s       r/   check_generator_cacherT   v   s6    FtV$E
vx.C
uw-C::r6   c                   >   a  ] tR t^~t o R tR tR tR tR tRt	V t
R# )TestCachingc                \    V! 4        \        V4      pV P                  VR ,          ^ 4       R# )exitcodeN)r   assertEqual)selffuncress   && r/   run_testTestCaching.run_test   s%    (.Z!,r6   c                0    V P                  \        4       R # N)r]   rA   rZ   s   &r/   test_constant_unicode_cache'TestCaching.test_constant_unicode_cache   s    23r6   c                0    V P                  \        4       R # r`   )r]   rK   ra   s   &r/   test_dict_cacheTestCaching.test_dict_cache   s    &'r6   c                0    V P                  \        4       R # r`   )r]   rT   ra   s   &r/   test_generator_cache TestCaching.test_generator_cache   s    +,r6   c                j   \        V P                  P                  4      p\        P                  ! 4       pVP                  4       pVP                  \        W1R 3R7      pVP                  4        VP                  4        VP                  4       w  rVV'       g   V P                  V4       V P                  VRR4       VP                  \        W1R3R7      pVP                  4        VP                  4        VP                  4       w  rVV'       g   V P                  V4       V P                  VRR4       R# )Ftargetargs  z-Omitted function returned an incorrect outputTN)r   	__class____name__multiprocessingget_contextQueueProcessomitted_child_test_wrapperstartr$   getfailrY   )rZ   	cache_dirctxresult_queueprocsuccessoutputs   &      r/   test_omittedTestCaching.test_omitted   s    #4>>#:#:;	))+yy{{{-51  
 	

		&**, IIf;	
 {{-40  
 	

		&**, IIf;	
r6   rE   N)rp   
__module____qualname____firstlineno__r]   rb   re   rh   r   __static_attributes____classdictcell____classdict__s   @r/   rV   rV   ~   s#     -
4(-(
 (
r6   rV   c                    \        R V4      ;_uu_ 4        \        RR7      R
R l4       p V! 4       pV'       db   VP                  VP                  ^ ,          ,          ^8X  g   Q R4       hVP                  VP                  ^ ,          ,          ^ 8X  g   Q R4       hM`VP                  VP                  ^ ,          ,          ^8X  g   Q R4       hVP                  VP                  ^ ,          ,          ^ 8X  g   Q R4       hRpT P                  YT34       R	R	R	4       R	#    \
        P                  ! 4       pRp L7; i  + '       g   i     R	# ; i)	CACHE_DIRTr9   c                     V # r`   rE   )nums   &r/   test(omitted_child_test_wrapper.<locals>.test   s    Jr6   zCache did not hit as expectedzCache has an unexpected misszCache did not miss as expectedzCache has an unexpected hitFN)rn   )r   r   _cache_hits
signatures_cache_misses	traceback
format_excput)r{   ry   second_callr   r~   r}   s   &&&   r/   ru   ru      s/   	i	0	0	D		 
		VF ''(:;q@ 434@))$//!*<=B 323B ))$//!*<=B 545B''(:;q@ 212@G
 	'*+1 
1	0*	))+FG/ 
1	0	0s#   D7CD=D7D42D77E	c                   R   a  ] tR t^t o RtRtR tR tR tR t	R t
R tR tR	tV tR# )
BaseCacheTestNc                D   \        R 4      V n        \        P                  P	                  ^ V P                  4       \
        P                  P                  V P                  V P                  R,           4      V n        \
        P                  P                  V P                  R4      V n	        \        P                  ! V P                  V P                  4       \
        P                  ! V P                  \        P                  \        P                   ,          4       RV n        R# )r   z.py__pycache__N)r   r,   sysr#   insertr"   r$   modnamemodfilery   r)   copyusecases_filer(   statS_IREADS_IWRITEmaxDiffra   s   &r/   setUpBaseCacheTest.setUp   s    %l34<<(ww||DLL$,,2FGdllMBD&&5
t||dmm;<r6   c                    \         P                  P                  V P                  R 4       \         P                  P                  V P                  4       R # r`   )r   modulespopr   r#   remover,   ra   s   &r/   tearDownBaseCacheTest.tearDown   s,    d+%r6   c                t   \         P                  P                  V P                  R 4      pVe.   VP                  .pV F  p \
        P                  ! V4       K  	  \        V P                  4      pV P                  VP                  P                  R4      V P                  4       V#   \         d     Kx  i ; i)Nco)r   r   r   r   
__cached__r"   unlinkFileNotFoundErrorr   rY   __file__rstripr   )rZ   oldcachedfnmods   &    r/   import_moduleBaseCacheTest.import_module   s     kkoodllD1?nn%FIIbM 
 T\\*,,T2DLLA
	 ) s   B((B76B7c                     \         P                  ! V P                  4       Uu. uF  pVP                  R4      '       d   K  VNK   	  up# u upi   \         d    . u # i ; i).pyc)r   z.pyo)r"   listdirry   endswithr   )rZ   r   s   & r/   cache_contentsBaseCacheTest.cache_contents   s\    	!#DNN!; :!;2;;'78 B!; : : :  	I	s(   "A AAA A A A c                \   a  \        V 3R  l\        S P                  4       4       4       4      # )c              3      <"   T FN  pV\         P                  P                  \         P                  P                  SP                  V4      4      3x  KP  	  R # 5ir`   )r"   r#   getmtimer$   ry   ).0r   rZ   s   & r/   	<genexpr>1BaseCacheTest.get_cache_mtimes.<locals>.<genexpr>   s?      =; ))"'',,t~~r*JKL;s   AA)dictsortedr   ra   s   fr/   get_cache_mtimesBaseCacheTest.get_cache_mtimes   s+     =$T%8%8%:;= = 	=r6   c                \    V P                  4       pV P                  \        V4      W4       R # r`   )r   rY   len)rZ   nr4   s   && r/   check_pycacheBaseCacheTest.check_pycache  s$    !Q&r6   c                    R # r`   rE   ra   s   &r/   
dummy_testBaseCacheTest.dummy_test  s    r6   )ry   r   r   r,   )rp   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   s   @r/   r   r      s7     MG&"=' r6   r   c                      a  ] tR tRt o ]P
                  P                  ]4      t]P
                  P                  ]R4      t
RtRR/R ltR	R ltRtV tR# )
DispatcherCacheUsecasesTesti  cache_usecases.pydispatcher_caching_test_fodderenvvarsNc          	        Vf   / pR\        V P                  V P                  R7      ,          p\        P                  P                  4       pVP                  V4       \        P                  ! \        P                  RV.\        P                  \        P                  VR7      pVP                  4       w  rVVP                  ^ 8w  d?   \        RVP                  : RVP                  4       : RVP                  4       : R24      hR # )	Nzif 1:
            import sys

            sys.path.insert(0, %(tempdir)r)
            mod = __import__(%(modname)r)
            mod.self_test()
            r,   r   -c)stdoutstderrenvprocess failed with code z: 
stdout follows
z
stderr follows

)r   r,   r   r"   environr   update
subprocessPopenr   
executablePIPEcommunicate
returncodeAssertionErrordecode)rZ   r   codesubp_envpopenouterrs   &$     r/   run_in_separate_process3DispatcherCacheUsecasesTest.run_in_separate_process  s     ?G t||T\\BC ::??$   #..$!=(2
%-/ $$&q   ##SZZ\3::<A  !r6   c                    VP                   pV P                  \        VP                  P	                  4       4      W$P                  4       VeA   V P                  \        VP
                  P	                  4       4      VVP
                  4       R # R # r`   )statsrY   sum
cache_hitsvaluescache_misses)rZ   r[   hitsmissessts   &&&& r/   
check_hits&DispatcherCacheUsecasesTest.check_hits,  sg    ZZR]]1134dMMJS!7!7!9:F__. r6   rE   r`   )rp   r   r   r   r"   r#   dirnamer   herer$   r   r   r   r   r   r   r   s   @r/   r   r     sG     77??8$DGGLL':;M.G 8. .r6   r   c                     a  ] tR tRt 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R tR t]]P,                  ! ]P0                  R8H  R4      R 4       4       t]]P,                  ! ]P0                  R8H  R4      R 4       4       tR t]P,                  ! ]RJ ;'       g    ]P:                  ^ ,          ^8  R4      R 4       tRtV t R# )	TestCachei4  c                n   V P                  ^ 4       V P                  4       pV P                  ^ 4       VP                  pV P                  V! ^^4      ^4       V P                  ^4       V P                  V! R^4      R4       V P                  ^4       V P	                  V^ ^4       VP
                  pV P                  V! ^^4      ^4       V P                  ^4       V P                  V! R^4      R4       V P                  ^4       V P	                  V^ ^4       VP                  pV! VP                  ^4      pV P                  \        V4      R4       V! VP                  ^4      pV P                  \        V4      R4       V P                  ^	4       V P	                  V^ ^4       V P                  4        R# )r         @      @N)rN   g     E@)r   r   add_usecaseassertPreciseEqualr   add_objmode_usecaserecord_returnaligned_arrtuple
packed_arrr   )rZ   r   r.   recs   &   r/   test_cachingTestCache.test_caching6  so   1  "1OO!Q+1#q	3/11a ##!Q+1#q	3/11a #c
I6"c
I611a  	$$&r6   c                   V P                  ^ 4       V P                  4       pV P                  ^ 4       VP                  pV P                  V! ^^4      ^4       V P                  ^4       V P                  V! ^\        P
                  ! ^4      4      ^\        P
                  ! ^4      ,           ^,           4       V P                  ^4       V P                  V^ ^4       R# r   N)r   r   r   r  nparanger   rZ   r   r.   s   &  r/   test_caching_nrt_pruned!TestCache.test_caching_nrt_prunedT  s    1  "1OO!Q+1!RYYq\ 2A		!4Dq4HI11a r6   c                D   V P                  4       pV P                  VP                  ^^4      ^4       V P                  ^4       VP                  pV P                  V! ^^4      ^4       V P                  ^4       V P                  4       pVP                  pV P                  V! ^^4      ^4       V P                  ^4       VP
                  pV P                  V! ^^4      ^4       V P                  ^4       V P                  V! R^4      R4       V P                  ^4       R# )rO         @r   N)r   r  innerr   outer_uncachedouterr  s   &  r/   test_inner_then_outerTestCache.test_inner_then_outera  s      "		!Q31!Q+1  "!Q+1II!Q+1#q	3/1r6   c                   V P                  4       pV P                  VP                  ^^4      ^4       V P                  ^4       V P                  VP	                  ^^4      ^4       V P                  ^4       V P                  4       pVP
                  pV P                  V! ^^4      ^4       V P                  ^4       V P                  V! R^4      R4       V P                  ^4       R# )rO   r  r   N)r   r  r  r   r  r  r  s   &  r/   test_outer_then_innerTestCache.test_outer_then_inneru  s      "		!Q31 2 21a 8!<1  "II!Q+1#q	3/1r6   c                    V P                  4       pVP                  pV P                  V! ^^4      ^4       V P                  ^ 4       R# rN   N)r   add_nocache_usecaser  r   r  s   &  r/   test_no_cachingTestCache.test_no_caching  s?      "##!Q+1r6   c                   V P                  4       p\        P                  ! R R7      ;_uu_ 4       p\        P                  ! R\        4       VP
                  pV P                  V! ^4      ^4       V P                  ^ 4       RRR4       V P                  \        X4      ^4       V P                  R\        V^ ,          P                  4      4       R#   + '       g   i     LY; i)TrecordalwaysNzBCannot cache compiled function "looplifted" as it uses lifted code)r   warningscatch_warningssimplefilterr   
loopliftedr  r   rY   r   assertInstrmessagerZ   r   wr.   s   &   r/   test_loopliftedTestCache.test_looplifted  s      "$$D11Q!!(L9A##AaD!,q! 2 	Q# /03AaDLL0A	C 21s   ACC"	c                   V P                  4       p\        P                  ! R R7      ;_uu_ 4       p\        P                  ! R\        4       VP
                  p\        P                  P                  V! 4       VP                  4       V P                  ^ 4       RRR4       V P                  \        X4      ^4       V P                  R\        V^ ,          P                  4      4       R#   + '       g   i     LY; i)Tr!  r#  NzICannot cache compiled function "use_big_array" as it uses dynamic globals)r   r$  r%  r&  r   use_big_arrayr  testingassert_equalbiggier   rY   r   r(  r)  r*  r+  s   &   r/   test_big_arrayTestCache.test_big_array  s      "$$D11Q!!(L9!!AJJ##AC4q! 2 	Q# 347!4E	G 21s   A(C))C9	c                8   V P                  4       pVP                  VP                  VP                  3 F  p\        P
                  ! R R7      ;_uu_ 4       p\        P                  ! R\        4       V P                  V! R4      R4       V P                  ^ 4       RRR4       V P                  \        X4      ^4       V P                  RP                  VP                  4      \        V^ ,          P                   4      4       K  	  R#   + '       g   i     Lv; i)Tr!  r#  g        Nz#Cannot cache compiled function "{}")r   	use_c_sinuse_c_sin_nest1use_c_sin_nest2r$  r%  r&  r   r  r   rY   r   r(  formatrp   r)  r*  )rZ   r   r.   r,  s   &   r/   test_ctypesTestCache.test_ctypes  s       "--!4!4c6I6IJA((55%%h=''#4""1%	 6 SVQ'MM5<<QZZHAaDLL! K55s   AD		Dc                   V P                  4       p\        P                  ! 4       ;_uu_ 4        \        P                  ! R \        4       VP
                  pV P                  V! ^4      ^4       VP                  pV P                  V! ^4      ^4       VP                  pV P                  V! ^4      ^
4       VP                  pV P                  V! ^4      ^4       V P                  ^4       RRR4       R#   + '       g   i     R# ; i)errorN)r   r$  r%  r&  r   closure1r  closure2closure3closure4r   r  s   &  r/   test_closureTestCache.test_closure  s      "$$&&!!'<8A##AaD!,A##AaD!,A##AaD"-A##AaD"-q! '&&&s   B=C55D	c                x   V P                  4       pVP                  pV P                  V! VP                  ^4      ^4       V P                  V! VP                  ^
4      ^d4       V P                  V! VP                  ^4      ^4       V P                  V! VP                  ^
4      ^4       V P                  ^4       R# )rM   N)r   first_class_function_usecaserY   first_class_function_mulfirst_class_function_addr   r  s   &  r/   test_first_class_function#TestCache.test_first_class_function  s      ",,377;Q?377<cB377;Q?377<bA 	1r6   c                ^   V P                  4       pVP                  ^^4       VP                  RR4       VP                  ^^4       VP                  ^^4       VP	                  ^^4       VP                  VP                  ^ 4       VP                  VP                  ^4       V P                  4       pV P                  VP                  ^ ^4       V P                  4       pV P                  W4       VP                  pV! ^^4       V P                  V^^ 4       V! RR4       V P                  V^^ 4       VP                  pV! ^^4       V P                  V^^ 4       V P                  V P                  4       V4       V P                  4        V P                  V P                  4       V4       R# )rN   r   r  N)r   r   r  r  r  r  r  r  r   r   assertIsNotrY   r   )rZ   r   mtimesmod2r.   s   &    r/   test_cache_reuseTestCache.test_cache_reuse  s`     "1S!1%1a 		!Q#..!,#//1-&&(A.!!##	!Q1a 	#s1a $$	!Q1a  	..0&9$$&..0&9r6   c                   V P                  4       pVP                  pV P                  V! ^^4      ^4       \        V P                  R4      ;_uu_ 4       pVP                  R4       RRR4       V P                  4       pVP                  pV P                  V! ^^4      ^4       VP                  pV P                  V! ^^4      ^4       R#   + '       g   i     Ll; i)rN   rC   z
Z = 10
N)r   r   r  r&   r   r'   r  r  s   &  r/   test_cache_invalidateTestCache.test_cache_invalidate  s      "OO!Q+ $,,$$GGL! %   "OO!Q,##!Q, %$s   C

C	c                   V P                  4       pVP                  pV P                  V! ^^4      ^4       V P                  4       pVP                  p^
Vn        V P                  V! ^^4      ^4       VP	                  4        V P                  V! ^^4      ^4       V P                  4       pVP                  pV P                  V! ^^4      ^4       R# r  )r   r   r  Z	recompiler  s   &  r/   test_recompileTestCache.test_recompile  s      "OO!Q+  "OO!Q+	!Q,   "OO!Q,r6   c                    V P                  4       pVP                  pV P                  V! ^4      ^4       VP                  pV P                  V! ^4      ^4       R# r  )r   renamed_function1r  renamed_function2r  s   &  r/   test_same_namesTestCache.test_same_names  sN      "!!!a(!!!a(r6   c                t   ^RI Hp VP                  p\        RRR4      p W1n        \        P
                  ! V4      p\        P                  ! W4      pV P                  V4       R\        n
        \        P                  ! W4      pV P                  V\        4       W!n        \        =
R#   Y!n        \        =
i ; i)rM   functionpassztests/dummy_module.pyexecTN)dummy_moduler`  __code__compileinspectgetfiler   from_functionassertIsNoner   frozenassertIsInstance)rZ   r`  old_codecode_objsourcelocators   &     r/   test_frozenTestCache.test_frozen  s    *$$6#:FC	 (__X.F +88JGg&CJ +88JG!!'+?@ !)
 !)
s   A:B) )B7c                   V P                  4       pVP                  pV P                  \        P                  VP
                  P                  RR7       V P                  V! ^^4      ^4       V P                  V^ ^4       V P                  4       pVP                  pV P                  V! ^^4      ^4       V P                  V^^ 4       V P                  ^ 4       R# )za
With a disabled __pycache__, test there is a working fallback
(e.g. on the user-wide cache dir)
T)ignore_errorsN)
r   r   
addCleanupr)   r*   r   
cache_pathr  r   r   )rZ   r   r.   rN  s   &   r/   _test_pycache_fallback TestCache._test_pycache_fallback2  s    
   "OO 	qww'9'9N!Q+1a  !!#!Q+1a  	1r6   ntz3cannot easily make a directory read-only on Windowsc                   \         P                  ! V P                  4      P                  p\         P                  ! V P                  R 4       V P                  \         P                  V P                  V4       V P                  4        R# )r   N)r"   r   r,   st_moder(   rt  rv  )rZ   	old_permss   & r/   test_non_creatable_pycache$TestCache.test_non_creatable_pycacheK  sR    
 GGDLL)11	
u%$,,	:##%r6   c                T   \         P                  P                  V P                  R 4      p\         P                  ! V4       \         P
                  ! V4      P                  p\         P                  ! VR4       V P                  \         P                  W4       V P                  4        R# )r   r   N)
r"   r#   r$   r,   r%   r   rz  r(   rt  rv  )rZ   pycacher{  s   &  r/   test_non_writable_pycache#TestCache.test_non_writable_pycacheV  sh    
 '',,t||];
GGG$,,	
% '5##%r6   c                  a aa \         P                  R R.oS. R
O,          o \        P                  ! SR.,           4      pXP                  4       P                  4       p\        P                  P                  S P                  R4      o\        SR4      ;_uu_ 4       pVP                  R4       RRR4       VVV 3R lpV! 4        V! 4       pS P                  R	VP                  4       4       R#   \        P                   d-   pS P                  RTP                  ,          4        Rp?LRp?ii ; i  + '       g   i     L; i)-mIPython	--version%ipython not available: return code %dNzipython_cache_usecase.txtr,  }  
                import os
                import sys

                from numba import jit

                # IPython 5 does not support multiline input if stdin isn't
                # a tty (https://github.com/ipython/ipython/issues/9752)
                f = jit(cache=True)(lambda: 42)

                res = f()
                # IPython writes on stdout, so use stderr instead
                sys.stderr.write(u"cache hits = %d\n" % f.stats.cache_hits[()])

                # IPython hijacks sys.exit(), bypass it
                sys.stdout.flush()
                sys.stderr.flush()
                os._exit(res)
                c            
      j  < \        SR 4      ;_uu_ 4       p \        P                  ! SV \        P                  \        P                  RR7      pVP	                  4       w  r#VP
                  ^*8w  d%   SP                  RVP
                  W#3,          4       VuuRRR4       #   + '       g   i     R# ; irbT)stdinr   r   universal_newlinesz6unexpected return code %d
-- stdout:
%s
-- stderr:
%s
Nr&   r   r   r   r   r   rx   r  pr   r   base_cmdinputfnrZ   s       r/   execute_with_input2TestCache.test_ipython.<locals>.execute_with_input      gt$$$$XU,6OO,6OO8<> ==?<<2%II 1 "#s 89 :  %$$$   B B!!B2	cache hits = 1z--quietz--quickz--no-bannerz--colors=NoColor)r   r   r   check_outputCalledProcessErrorskipTestr   stripr   r"   r#   r$   r,   r&   r'   r(  )rZ   verer.   r  r   r  r  s   f     @@r/   test_ipythonTestCache.test_ipythonc  s    NND)4MM	*))(k]*BCC iik  "'',,t||-HI'31GG    *	 	 "&		4[ ,, 	*MMALL) * *	*  s#   C/ D3/D0"D++D03E	Nzrequires ipykernel >= 6c                d  a aa \         P                  R R.oS. R
O,          o \        P                  ! SR.,           4      pXP                  4       P                  4       p^ RI	H
p VP                  4       o\        SR4      ;_uu_ 4       pVP                  R4       RRR4       VVV 3R lpV! 4        V! 4       pS P                  R	VP                  4       4       R#   \        P                   d-   pS P                  RTP                  ,          4        Rp?LRp?ii ; i  + '       g   i     L; i)r  r  r  r  N)compilerr,  r  c            
      j  < \        SR 4      ;_uu_ 4       p \        P                  ! SV \        P                  \        P                  RR7      pVP	                  4       w  r#VP
                  ^*8w  d%   SP                  RVP
                  W#3,          4       VuuRRR4       #   + '       g   i     R# ; ir  r  r  s       r/   r  4TestCache.test_ipykernel.<locals>.execute_with_input  r  r  r  r  )r   r   r   r  r  r  r   r  r   	ipykernelr  get_tmp_directoryr&   r'   r(  )	rZ   r  r  r  r.   r  r   r  r  s	   f      @@r/   test_ipykernelTestCache.test_ipykernel  s    
 NND)4MM	*))(k]*BCC iik  "&,,.'31GG    *	 	 "&		4] ,, 	*MMALL) * *	*  s#   C 	DD0"DDD/	rE   )!rp   r   r   r   r  r  r  r  r  r-  r4  r;  rC  rI  rO  rR  rW  r\  rp  rv  skip_bad_accessunittestskipIfr"   namer|  r  r  r  version_infor  r   r   r   s   @r/   r   r   4  s    '<!(CG$" 	:<--$).2 __RWW_JL&L & __RWW_JL&L &35j __i4'KKY-C-CA-F-J.055055r6   r   c                   >   a a ] tR tRt oV 3R ltR tR tRtVtV ;t	# )TestCacheZipi  c                j  < \         SV `  4        R pRpRp\        P                  P	                  V P
                  V4      p\        P                  ! VR4      ;_uu_ 4       pVP                  W!4       RRR4       \        P                  P                  ^ V4       RV n        R#   + '       g   i     L9; i)zI
from numba import jit

@jit(cache=True)
def add(x, y):
    return x + y
ztest_module.pyztest_archive.zipr,  Ntest_module)superr   r"   r#   r$   r,   zipfileZipFilewritestrr   r   r   )rZ   mod_contentmod_filenamezip_filenamezip_pathzfro   s   &     r/   r   TestCacheZip.setUp  s     () 77<<l;__Xs++rKK2 , 	8$$ ,+s   B""B2	c                    \         P                  P                  ^ 4       \         P                  P                  RR4       R# )r   r  N)r   r#   r   r   ra   s   &r/   r   TestCacheZip.tearDown  s#    Qt,r6   c                   ^ RI pVP                  ^^4      pV P                  V^4       V P                  VP                  ^ ^4       V P                  VP                  ^ 4       \        P
                  R \        P                  ! 4        ^ RI pVP                  ^^4      pV P                  V^4       V P                  VP                  ^4       R# )r   Nr  )r  addrY   r   r   r   	importlibinvalidate_caches)rZ   r  result1result2s   &   r/   test_zip_cachingTestCacheZip.test_zip_caching  s     	//!Q'!$A. 	+ KK&##% //!Q'!$ 	+r6   )r   )
rp   r   r   r   r   r   r  r   r   __classcell__ro   r   s   @@r/   r  r    s     %.-, ,r6   r  c                   0   a  ] tR tRt o RtR tR tRtV tR# )TestCacheZipLibi  zJ
ZipCache tests that don't require the setup/teardown from `TestCacheZip`
c                    R  pRp\         P                  ! W4      pV P                  V4       V P                  VP                  \        \        R4      4      4       V P                  VP                  R4       R# )c                      R # r`   rE   rE   r6   r/   	mock_func<TestCacheZipLib.test_zip_locator_creation.<locals>.mock_func      r6   z/path/to/archive.zip/module.pyz/path/to/archive.zipz	module.pyN)r   rh  assertIsNotNonerY   	_zip_pathr)  r   _internal_path)rZ   r  r  ro  s   &   r/   test_zip_locator_creation)TestCacheZipLib.test_zip_locator_creation  sc    	 4!//	DW%**C5K0L,MN//=r6   c                ^    R  pRp\         P                  ! W4      pV P                  V4       R# )c                      R # r`   rE   rE   r6   r/   r  @TestCacheZipLib.test_zip_locator_non_zip_path.<locals>.mock_func  r  r6   z/path/to/module.pyN)r   rh  ri  )rZ   r  non_zip_pathro  s   &   r/   test_zip_locator_non_zip_path-TestCacheZipLib.test_zip_locator_non_zip_path  s,    	 ,!//	H'"r6   rE   N)	rp   r   r   r   __doc__r  r  r   r   r   s   @r/   r  r    s     
># #r6   r  c                   D   a a ] tR tRt oV 3R ltV 3R ltR tRtVtV ;t	# )TestSequentialParForsCachei(  c                B   < \         \        V `  4        R \        n        R# )TN)r  r  r   r   sequential_parfor_loweringrZ   ro   s   &r/   r    TestSequentialParForsCache.setUp*  s    ($57,0)r6   c                B   < \         \        V `  4        R \        n        R# )FN)r  r  r   r   r  r  s   &r/   r   #TestSequentialParForsCache.tearDown/  s    ($8:,1)r6   c                   V P                  4       pV P                  ^ 4       VP                  p\        P                  ! ^
4      pV P                  V! V4      W3,          V,           4       VP                  P                  4        Uu. uF  pVP                  P                  NK  	  ppV P                  VR.4       V P                  ^4       R# u upi )r   FN)r   r   parfor_usecaser  onesr  	overloadsr   libraryhas_dynamic_globalsrY   )rZ   r   r.   arycresdynamic_globalss   &     r/   r  'TestSequentialParForsCache.test_caching4  s      "1ggbk#	C8'({{'9'9';=';t  <<;;'; 	 =5'21=s   CrE   )
rp   r   r   r   r   r   r  r   r   r  r  s   @@r/   r  r  (  s     1
2
	 	r6   r  c                      a  ] tR tRt o RtR t]P                  ! ]P                  ! 4       R8H  R4      R 4       t
R tRtV tR	# )
TestCacheWithCpuSettingi@  Fc                    ^ pV P                  4       P                  4        F.  w  r4W19   g   K  V P                  WAV,          4       V^,          pK0  	  V P                  V^ RR7       R# )r   znothing to comparemsgN)r   itemsassertGreaterEqualassertGreater)rZ   
mtimes_oldmatch_countkrP   s   &&   r/   check_later_mtimes*TestCacheWithCpuSetting.check_later_mtimesD  sb    ))+113DA''a=9q  4 	;3 	 	5r6   genericzLLVM detected 'generic' CPUc                   V P                  ^ 4       V P                  R\        P                  ! 4       RR/R7       V P	                  4       p\        V P                  4       4      pV P                  RRRR/R7       V P                  V4       V P                  \        V P                  4       4      V4       V P                  4       pVP                  P                  pVP                  pVP                  4       pV P                  \        V4      ^4       VP                  4       w  rxV^,          ^,          R8X  d   YxrMYxrV P                  V
^,          ^,          \        P                  ! 4       4       V P                  V
^,          ^,          R4       V P                  V	^,          ^,          R4       V P                  V	^,          ^,          R4       R# )r   NUMBA_CPU_NAMENUMBA_CPU_FEATURES r   r  N)r   r   llget_host_cpu_namer   r   r   r  r  r   r   _cache_cache_file_load_indexrY   keys)rZ   rM  
cache_sizer   r:   
cache_filecache_indexkey_akey_bkey_generickey_hosts   &          r/   test_user_set_cpu_name.TestCacheWithCpuSetting.test_user_set_cpu_nameM  s    	1 	$$%r';';'=)2/ 	% 	
 &&(,,./
 	$$i ".
$ 	
 	'3t2245zB  "&&&&
 ,,.[)1-$))+8A;)#$)$)k!Q)=)=)?@!Q,Q*I6Q*B/r6   c                   V P                  ^ 4       \        P                  P                  4       p\        P                  ! 4       pV P                  RV/R7       \        V P                  4       4      pV P                  4       pRpV P                  W%4       V P                  RV/R7       V P                  V4       V P                  \        V P                  4       4      V4       V P                  4       pVP                  P                  pVP                  pVP!                  4       p	V P#                  \        V	4      ^4       V	P%                  4       w  rV
^,          ^,          V8X  d   YrMYrV P#                  V^,          ^,          VP'                  4       4       V P#                  V^,          ^,          V4       V P#                  V^,          ^,          VP'                  4       4       V P#                  V^,          ^,          V4       R# )r   r  r  z	-sse;-avxN)r   r   target_contextr   get_host_cpu_featuresr   r   r   r   assertNotEqualr  r  r   r   r  r  r  rY   r  _get_host_cpu_name)rZ   cpu_codegensystem_featuresr  rM  my_cpu_featuresr   r:   r  r  r  r	  key_modifiedr  s   &             r/   test_user_set_cpu_features2TestCacheWithCpuSetting.test_user_set_cpu_featuresr  s   1 //779!779 	$$)?; 	% 	
 ,,./
&&(%O=$$)?; 	% 	
 	'3t2245zB  "&&&&
 ,,.[)1-$))+8A;/)%*(%*l!Q)G)G)IJ!Q9a+[-K-K-MNa+_=r6   rE   N)rp   r   r   r   _numba_parallel_test_r  r  r  r  r   r  r  r   r   r   s   @r/   r  r  @  sK     !5 __R))+y824!04!0F'> '>r6   r  c                      a  ] tR tRt o Rt]P                  P                  ]4      t	]P                  P                  ]	R4      tRtR tRtV tR# )TestMultiprocessCachei  Fr   r   c                   V P                  4       pVP                  p^p \        P                  ! R4      pVP                  V4      p \        VP                  V\        V4      4      4      pVP                  4        V P                  WcV^,
          ,          ^,          4       R#   \         d
    \        p Li ; i  TP                  4        i ; i)rO   spawnN)r   simple_usecase_callerrq   rr   AttributeErrorPoolr   imaprangecloserY   )rZ   r   r.   r   rz   poolr\   s   &      r/   test_multiprocessing*TestMultiprocessCache.test_multiprocessing  s      " %%	"!--g6C xx{	dii58,-CJJL1q5kQ./  	"!C	" JJLs   B$ $B; $B87B8;CrE   N)rp   r   r   r   r  r"   r#   r   r   r   r$   r   r   r%  r   r   r   s   @r/   r  r    sC      "77??8$DGGLL':;M.G0 0r6   r  c                      a  ] tR tRt o Rt]P                  P                  ]4      t	]P                  P                  ]	R4      tRtRtRtR tR tR	 tR
 tR t]P*                  ! ]! ]R4      R4      R 4       tRtV tR# )TestCacheFileCollisioni  Fr   caching_file_loc_fodderzD
from numba import njit
@njit(cache=True)
def bar():
    return 123
zD
from numba import njit
@njit(cache=True)
def bar():
    return 321
c                l   \        R 4      V n        \        P                  P	                  ^ V P                  4       RV n        V P                  V P
                  \        P                  4       V P
                  V n        RP                  V P
                  R.4      V n
        \        P                  P                  V P                  V P
                  4      p\        P                  ! V4       \        \        P                  P                  VR4      R4      ;_uu_ 4       p\        V P                  VR7       RRR4       \        \        P                  P                  VR4      R4      ;_uu_ 4       p\        V P                   VR7       RRR4       R#   + '       g   i     Ld; i  + '       g   i     R# ; i)	test_cache_file_locmodule_name_that_is_unlikely.fooz__init__.pyr,  fileNzfoo.py)r   r,   r   r#   r   r   assertNotInr   modname_bar1r$   modname_bar2r"   r%   r&   printsource_text_1source_text_2)rZ   foomodfouts   &  r/   r   TestCacheFileCollision.setUp  s   %&;<4<<(5s{{3 LLHHdllE%:;dllDLL9
"'',,v}5s;;t$$$40 <"'',,vx0#66$$$$40 76 <;666s   F-F"F	"F3	c                    \         P                  P                  V P                  R 4       \         P                  P                  V P                  R 4       \         P
                  P                  V P                  4       R # r`   )r   r   r   r2  r3  r#   r   r,   ra   s   &r/   r   TestCacheFileCollision.tearDown  sF    ))40))40%r6   c                @    \        V P                  4      P                  # r`   )r   r2  barra   s   &r/   import_bar1"TestCacheFileCollision.import_bar1      d//0444r6   c                @    \        V P                  4      P                  # r`   )r   r3  r=  ra   s   &r/   import_bar2"TestCacheFileCollision.import_bar2  r@  r6   c                h   V P                  4       pV P                  4       pVP                  P                  P                  pVP                  P                  P                  pV P                  W44       V P                  VP                  R 4      4       V P                  VP                  R4      4       R# )z__init__.bar-3.pyzfoo.bar-3.pyN)r>  rB  r  r  _index_namer  
assertTrue
startswith)rZ   bar1bar2idxname1idxname2s   &    r/   test_file_location)TestCacheFileCollision.test_file_location  s    !!;;**66;;**66H/++,?@A++N;<r6   rr   z)Test requires multiprocessing.get_contextc                   V P                  4       pV P                  4       p\        4       ;_uu_ 4       pV! 4       pR R R 4       XP                  4       pV P	                  VP                  R4      ^4       V P	                  VP                  R4      ^4       V P	                  VP                  R4      ^ 4       V P	                  VP                  R4      ^ 4       \        4       ;_uu_ 4       pV! 4       pR R R 4       VP                  4       pV P	                  VP                  R4      ^4       V P	                  VP                  R4      ^4       V P	                  VP                  R4      ^ 4       V P	                  VP                  R4      ^ 4       V P                  XX4        \        P                  ! R4      pXP                  4       pVP                  \        WP                  V P                  V P                   3R7      p	V	P#                  4        VP%                  4       p
VP%                  4       pVP%                  4       pVP%                  4       pV	P'                  4        V P	                  W4       V P	                  W4       V P	                  V
P                  R4      ^ 4       V P	                  V
P                  R4      ^ 4       V P	                  V
P                  R4      ^4       V P	                  V
P                  R4      ^4       V P	                  VP                  R4      ^ 4       V P	                  VP                  R4      ^ 4       V P	                  VP                  R4      ^4       V P	                  VP                  R4      ^4       R #   + '       g   i     ELX; i  + '       g   i     EL; i  \         d    \        R4        ELi ; i)Nzindex savedz
data savedzindex loadedzdata loadedr  zmissing spawn contextrk   )r>  rB  r   getvaluerY   countr  rq   rr   
ValueErrorr4  rs   rt   cache_file_collision_testerr,   r2  r3  rv   rw   r$   )rZ   rH  rI  bufres1cachelogres2mpqr|   log1got1log2got2s   &             r/   test_no_collision(TestCacheFileCollision.test_no_collision  s    !!  C6D !<<>6:5q97;6:  C6D !<<>6:5q97;6:D$'	+ !,,W5B HHJzz!< !<< $ 1 1 $ 1 1 3  4 	

uuwuuwuuwuuw		 	$$ 	M2A6L115N3Q7M2A6 	M2A6L115N3Q7M2A6m !   !    	+)*	+s)   N
)N N2 
N	N/	2OO)r   r2  r3  r,   N)rp   r   r   r   r  r"   r#   r   r   r   r$   r   r   r5  r6  r   r   r>  rB  rL  r  
skipUnlesshasattrrq   r]  r   r   r   s   @r/   r(  r(    s     !77??8$DGGLL':;M'GMM1&
55= -@DF97F97r6   r(  c                 .   \         P                  P                  ^ V4       \        V4      P                  p\        V4      P                  p\        4       ;_uu_ 4       pV! 4       pRRR4       V P                  XP                  4       4       V P                  X4       \        4       ;_uu_ 4       pV! 4       pRRR4       V P                  VP                  4       4       V P                  X4       R#   + '       g   i     L; i  + '       g   i     LU; ir  )r   r#   r   r   r=  r   r   rO  )	rX  r,   r2  r3  rH  rI  rS  r1r2s	   &&&&     r/   rR  rR  .  s    HHOOAw,'++D,'++D			V 
EE#,,.EE"I			V 
EE#,,.EE"I 
	 
	s   C1/D1D	D	c                   >   a  ] tR tRt o RtRtRtR tR tR t	Rt
V tR	# )
#TestCacheMultipleFilesWithSignaturei<  Fz
from file2 import function2
z
from numba import njit

@njit('float64(float64)', cache=True)
def function1(x):
    return x

@njit('float64(float64)', cache=True)
def function2(x):
    return x
c                (   \        R 4      V n        \        P                  P	                  V P                  R4      V n        \        V P
                  R4      ;_uu_ 4       p\        V P                  VR7       RRR4       \        P                  P	                  V P                  R4      V n	        \        V P                  R4      ;_uu_ 4       p\        V P                  VR7       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)r+  zfile1.pyr,  r/  Nzfile2.py)r   r,   r"   r#   r$   file1r&   r4  source_text_file1file2source_text_file2)rZ   r8  s   & r/   r   )TestCacheMultipleFilesWithSignature.setUpP  s    %&;<WW\\$,,
;
$**c""d$((t4 # WW\\$,,
;
$**c""d$((t4 #"	 #" #""s   C-D -C=	 D	c                F    \         P                  ! V P                  4       R # r`   )r)   r*   r,   ra   s   &r/   r   ,TestCacheMultipleFilesWithSignature.tearDown[  s    dll#r6   c                   \         P                  ! \        P                  V P                  .\         P
                  \         P
                  R 7      pVP                  4       w  r#RVP                  4        RVP                  4        2pV P                  VP                  ^ VR7       \         P                  ! \        P                  V P                  .\         P
                  \         P
                  R 7      pVP                  4       w  r#RVP                  4        RVP                  4        2pV P                  VP                  ^ V4       R# )r   r   zstdout:
z


stderr:
r  N)r   r   r   r   rg  r   r   r   rY   r   ri  )rZ   r   r   r   r  s   &    r/   *test_caching_mutliple_files_with_signatureNTestCacheMultipleFilesWithSignature.test_caching_mutliple_files_with_signature^  s      #..$**!=(2(29 $$&#**,}SZZ\NC))1#6   #..$**!=(2(29 $$&#**,}SZZ\NC))1c2r6   )rg  ri  r,   N)rp   r   r   r   r  rh  rj  r   r   rp  r   r   r   s   @r/   re  re  <  s1      "
	5$3 3r6   re  c                      a  ] tR tRt o ]P
                  P                  ]4      t]P
                  P                  ]R4      t
RtR tR tR tRtV tR# )	TestCFuncCacheip  zcfunc_cache_usecases.pycfunc_caching_test_fodderc                |   R \        V P                  V P                  R7      ,          p\        P                  ! \
        P                  RV.\        P                  \        P                  R7      pVP                  4       w  r4VP                  ^ 8w  d+   \        RVP                   RVP                  4        R24      hR# )af  if 1:
            import sys

            sys.path.insert(0, %(tempdir)r)
            mod = __import__(%(modname)r)
            mod.self_test()

            f = mod.add_usecase
            assert f.cache_hits == 1
            f = mod.outer
            assert f.cache_hits == 1
            f = mod.div_usecase
            assert f.cache_hits == 1
            r   r   ro  r   z:stderr follows
r   N)r   r,   r   r   r   r   r   r   r   r   r   r   )rZ   r   r   r   r   s   &    r/   r   &TestCFuncCache.run_in_separate_processv  s     t||T\\BC   #..$!=(2
Q$$&q  #<U=M=M<N O447JJL>"E F F !r6   c                &    VP                  4        R # r`   )	self_testrZ   r   s   &&r/   check_moduleTestCFuncCache.check_module  s    r6   c                p   V P                  ^ 4       V P                  4       pV P                  ^4       V P                  VP                  P                  ^ 4       V P                  VP
                  P                  ^ 4       V P                  VP                  P                  ^ 4       V P                  VP                  P                  ^ 4       V P                  V4       V P                  4       pV P                  ^4       V P                  VP                  P                  ^4       V P                  VP
                  P                  ^4       V P                  VP                  P                  ^ 4       V P                  VP                  P                  ^4       V P                  V4       V P                  4        R# r  )
r   r   rY   r   r   r  r  div_usecaserz  r   ry  s   & r/   r  TestCFuncCache.test_caching  sF   1  "133Q7--q100;;Q?33Q7#   "133Q7--q100;;Q?33Q7#$$&r6   rE   N)rp   r   r   r   r"   r#   r   r   r   r$   r   r   r   rz  r  r   r   r   s   @r/   rs  rs  p  sF     77??8$DGGLL'@AM)GF0' 'r6   rs  c                       ] tR tRtRtR# )TestLocatori  rE   N)rp   r   r   r   r   rE   r6   r/   r  r    s    r6   r  c                   B   a  ] tR tRt o RtR tR tR tR tR t	Rt
V tR	# )
&TestCacheLocatorEnvironmentIntegrationi  z9Integration tests for environment variable functionality.c           	         R  p\        RR4      ;_uu_ 4        V P                  \        4      ;_uu_ 4        \        V4       RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)c                      ^*# *   rE   rE   r6   r/   r  \TestCacheLocatorEnvironmentIntegration.test_locators_env_override_unknown.<locals>.mock_func      r6   NUMBA_CACHE_LOCATOR_CLASSESzfoo,barN)r   assertRaisesRuntimeErrorr	   )rZ   r  s   & r/   "test_locators_env_override_unknownITestCacheLocatorEnvironmentIntegration.test_locators_env_override_unknown  s_    	 !)
 
 ""<00i( 1	
 
 10	
 
 
s"   A'A	A'A$A''A8	c                    R  p\        RR4      ;_uu_ 4        \        V4      p\        pV P                  VP                  P
                  V4       RRR4       R#   + '       g   i     R# ; i)c                      ^*# r  rE   rE   r6   r/   r  [TestCacheLocatorEnvironmentIntegration.test_locators_env_override_single.<locals>.mock_func  r  r6   r  r   N)r   r	   r   rk  _implro  rZ   r  r:   expectedLocators   &   r/   !test_locators_env_override_singleHTestCacheLocatorEnvironmentIntegration.test_locators_env_override_single  s_    	 !)*
 
 "),E:O!!%++"5"5"13
 
 
 
s   8AA+	c                    R  p\        R\         R24      ;_uu_ 4        \        V4      p\        pV P	                  VP
                  P                  V4       RRR4       R#   + '       g   i     R# ; i)c                      ^*# r  rE   rE   r6   r/   r  [TestCacheLocatorEnvironmentIntegration.test_locators_env_override_custom.<locals>.mock_func  r  r6   r  z.TestLocatorN)r   rp   r	   r  rk  r  ro  r  s   &   r/   !test_locators_env_override_customHTestCacheLocatorEnvironmentIntegration.test_locators_env_override_custom  sf    	 !)j%
 
 "),E)O!!%++"5"5"13
 
 
 
s   8A!!A2	c                    R  pRp\         p\        RV4      ;_uu_ 4        \        V4      pV P                  VP                  P
                  V4       RRR4       R#   + '       g   i     R# ; i)c                      ^*# r  rE   rE   r6   r/   r  YTestCacheLocatorEnvironmentIntegration.test_locators_env_override_list.<locals>.mock_func  r  r6   zXInTreeCacheLocatorFsAgnostic,InTreeCacheLocator,IPythonCacheLocator,UserWideCacheLocatorr  N)r   r   r	   rk  r  ro  )rZ   r  locatorClassesr  r:   s   &    r/   test_locators_env_override_listFTestCacheLocatorEnvironmentIntegration.test_locators_env_override_list  sb    	E6 )
 
 "),E!!%++"5"5G
 
 
 
s   2AA-	c                z    R  p\        V4      p\        pV P                  VP                  P                  V4       R# )c                      ^*# r  rE   rE   r6   r/   r  OTestCacheLocatorEnvironmentIntegration.test_default_locators.<locals>.mock_func  r  r6   N)r	   r
   rk  r  ro  r  s   &   r/   test_default_locators<TestCacheLocatorEnvironmentIntegration.test_default_locators  s2    	 i(,ekk11?Cr6   rE   N)rp   r   r   r   r  r  r  r  r  r  r   r   r   s   @r/   r  r    s)     C	)33HD Dr6   r  c                   0   a  ] tR tRt o RtR tR tRtV tR# ) TestInTreeCacheLocatorFsAgnostici  z7Test _InTreeCacheLocatorFsAgnostic class functionality.c                X   ^RI Hp \        P                  ! V4      p\        P
                  ! W4      p\        P
                  ! W4      pV P                  V4       V P                  V4       VP                  4       pVP                  4       pV P                  \        V4      ^4       V P                  \        V4      ^4       V P                  V^,          V^,          4       V P                  V^ ,          \        V^ ,          4      4       V P                  V^ ,          V^ ,          4       R# )z9Test that FsAgnostic locator floors timestamp to seconds.r_  N)rc  r`  rf  rg  r
   rh  r   r  get_source_stamprY   r   r   assertLessEqual)rZ   r`  rn  regular_locatorfs_agnostic_locatorregular_stampfs_agnostic_stamps   &      r/   test_source_stamp_precision<TestInTreeCacheLocatorFsAgnostic.test_source_stamp_precision  s    ** -::8L:HH

 	_-01 (88:/@@B 	]+Q/./3 	q)+<Q+?@ 	*1-u]15E/FG 	.q1=3CDr6   c                \   ^RI Hp \        P                  ! V4      p\        P
                  ! W4      p\        P                  ! V4      pVP                  pVP                  4       p\        V4      pV P                  V^ ,          V4       V P                  V^,          VP                  4       R# )z:Test FsAgnostic timestamp handling using filesystem mtime.r_  N)rc  r`  rf  rg  r   rh  r"   r   st_mtimer  r   rY   st_size)rZ   r`  rn  r  stat_resultoriginal_mtimestampexpected_timestamps   &       r/   test_timestamp_precision_on_fs?TestInTreeCacheLocatorFsAgnostic.test_timestamp_precision_on_fs  s     	+* ;HH

 ggfo$-- $446 #>2q#56 	q;#6#67r6   rE   N)	rp   r   r   r   r  r  r  r   r   r   s   @r/   r  r    s     AEB8 8r6   r  __main__)Pr  rf  rq   r"   r)   r   r   r   r   r  r$  r  pathlibr   llvmlite.bindingbindingr  numpyr  mathr   numbar   
numba.corer   numba.core.cachingr   r   r	   r
   r   numba.core.errorsr   numba.parforsr   numba.tests.supportr   r   r   r   r   r   r   r   r   r   numba.core.registryr   r  ImportErrorr0   _access_preventable_access_msgr_  r  r5   rA   rF   rK   rQ   rT   rV   ru   r   r   r   r  r  r  r  r  r(  rR  re  rs  r  r  r  rp   mainrE   r6   r/   <module>r     s      	    
            +     +
 > 23 I%%&9;G

7
+x 7
t,84H 4n&.- &.R[5+ [5|8,. 8,v#1 #6 !<  .Y>9 Y>x0M 0: q7X.. q7 q7h13(*;*; 13h6'] 6'r	$ 	=DX =D@<8x <8~ zMMO {'  Is   F' '	F43F4