+
    Bi$              	       `   ^ 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t^ RIt^ RIHtHt  ^ RIHt ^ RIHt ^ RIHt ]! 4        Rt^ RIHt ^ R	IHt ^ R
IHt ^ RI H!t! ^ RI H"t" ^ RI#H$t$ R t%R t&R t' ! R R4      t( ! R R](]PR                  ]"RR7      t* ! R R](]PR                  ]"RR7      t+]PX                  ! ]PZ                  R4       ! R R]PR                  4      4       t. ! R R4      t/ ! R R]/]PR                  ]"RR7      t0 ! R R ]/]PR                  ]"RR7      t1]Pd                   ! R! R"4      4       t3 ! R# R$]3]PR                  ]"RR7      t4 ! R% R&]3]PR                  ]"RR7      t5]6R'8X  d   ]Pn                  ! 4        R# R#   ]]3 d    Rt ELOi ; i)(    N)mock
skipUnless)_cleanup_tests)ProcessPoolExecutor)_check_system_limitsTF)support)	os_helper)script_helper)without_source_date_epoch)SourceDateEpochTestMeta)FakePathc                 V    V'       g   R p\         P                  P                  WR7      # ) optimization)	importlibutilcache_from_sourcescriptopts   &&+/usr/lib/python3.14/test/test_compileall.pyget_pycr   $   s"    >>++F+EE    c                 B    R Uu. uF  p\        W4      NK  	  up# u upi )r   r         )r   r   s   & r   get_pycsr   +   s    ,56ISGF I666s   c                     \         P                  ! V 4      P                  p\         P                  ! V4      P                  pW#8H  # N)osstatst_ino)	filename1	filename2inode1inode2s   &&  r   is_hardlinkr)   /   s3    WWY&&FWWY&&Fr   c                     a  ] tR t^6t 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R tR tR tR t]! ]R4      ]P6                  ! R4      R 4       4       tR t]! ]R4      ]P6                  ! R4      R 4       4       t]! ]R4      ]P6                  ! R4      ]P6                  ! R4      R 4       4       4       t]! ]R4      ]P6                  ! RRR7      ]P6                  ! R4      R 4       4       4       t R t!R R!/R" lt"R# t#]! ]R4      R$ 4       t$R% t%]! ]R4      R& 4       t&R' t'R( t(R) t)R* t*R+ t+R, t,]-P\                  R- 4       t/R.t0V t1R# )/CompileallTestsBasec                F   \         P                  ! 4       V n        V P                  \        P
                  V P                  4       \        P                  P                  V P                  R 4      V n	        \        P                  P                  V P                  4      V n        \        V P                  RRR7      ;_uu_ 4       pVP                  R4       RRR4       \        P                  P                  V P                  R4      V n        \        P                  P                  V P                   4      V n        \        P$                  ! V P                  V P                   4       \        P                  P                  V P                  R4      V n        \        P(                  ! V P&                  4       \        P                  P                  V P&                  R4      V n        \        P$                  ! V P                  V P*                  4       R#   + '       g   i     ELD; i)	_test.pywutf-8encodingzx = 123
Nz	_test2.py_subdirz	_test3.py)tempfilemkdtemp	directory
addCleanupshutilrmtreer"   pathjoinsource_pathr   r   r   bc_pathopenwritesource_path2bc_path2copyfilesubdirectorymkdirsource_path3selffiles   & r   setUpCompileallTestsBase.setUp8   sH   !))+t~~677<<
C ~~778H8HI$""C'::dJJ{# ;GGLLE!889J9JK(($*;*;<GGLLC
""#GGLL):):KH(($*;*;< ;::s   HH 	c                    \         P                  P                  V P                  R 4      V n        \        V P                  RRR7      ;_uu_ 4       pVP                  R4       RRR4       R#   + '       g   i     R# ; i)z_test_bad.pyr.   r/   r0   zx (
N)r"   r9   r:   r5   bad_source_pathr=   r>   rE   s   & r   add_bad_source_file'CompileallTestsBase.add_bad_source_fileH   sO    !ww||DNNNK$&&g>>$JJw ?>>>s   A,,A=	c                v   \        V P                  R 4      ;_uu_ 4       pVP                  ^4      pRRR4       \        \        P
                  ! V P                  4      P                  4      p\        P                  ! R\        P                  P                  ^ VR,          4      pXV3#   + '       g   i     L; i)rbN<4sLL    )r=   r<   readintr"   r#   r;   st_mtimestructpackr   r   MAGIC_NUMBER)rF   rG   datamtimecompares   &    r   timestamp_metadata&CompileallTestsBase.timestamp_metadataM   s    $,,%%99R=D &BGGD,,-667++gy~~'B'BA#k13W} &%s   B((B8	c                    \         P                  ! V P                  R4       \        P                  ! \        P                  ! 4       4      ;_uu_ 4        V P                  \        P                  ! V P                  4      4       RRR4       R#   \        \        3 d    T P                  R4        Li ; i  + '       g   i     R# ; i)r   z0filesystem doesn't support timestamps near 2**32N)rQ   rQ   r"   utimer;   OverflowErrorOSErrorskipTest
contextlibredirect_stdoutioStringIO
assertTrue
compileallcompile_filerF   s   &r    test_year_2038_mtime_compilation4CompileallTestsBase.test_year_2038_mtime_compilationU   s    	NHHT%%'=> ''66OOJ33D4D4DEF 76 w' 	NMMLM	N666   !B 0B6"B32B36C	c                    \         P                  ! V P                  R4       \        P                  ! \        P                  ! 4       4      ;_uu_ 4        V P                  \        P                  ! V P                  4      4       RRR4       R#   \        \        3 d    T P                  R4        Li ; i  + '       g   i     R# ; i)r   z+filesystem doesn't support large timestampsN)         ro   r^   rj   s   &r   test_larger_than_32_bit_times1CompileallTestsBase.test_larger_than_32_bit_times_   s    	IHHT%%~6 ''66OOJ33D4D4DEF 76 w' 	IMMGH	I666rm   c                   \         P                  P                  R 4      '       d   \        P                  ! R4      h\
        P                  ! V P                  4       V P                  ! V P                  4       !   \        V P                  R4      ;_uu_ 4       pVP                  4       \        V4      R pRRR4       \        V P                  R4      ;_uu_ 4       pVP                  V4       VP                  X4       RRR4       V P                  ! V P                  4       !   \         P"                  ! V P$                  RRR7       V P&                  ! V P                  4       !   R#   + '       g   i     L; i  + '       g   i     L; i)SOURCE_DATE_EPOCHzSOURCE_DATE_EPOCH is setrO   NwbFTforcequiet)r"   environgetunittestSkipTest
py_compilecompiler;   assertEqualr[   r=   r<   rR   lenr>   assertNotEqualrh   compile_dirr5   rg   )rF   metadatarG   bcs   &&  r   recreation_check$CompileallTestsBase.recreation_checki   s    ::>>-..##$>??4++,$1134$,,%%S]^,B &$,,%%JJx JJrN & 	T4467t~~U$G0023 &%%%s   E'#E:'E7	:F
	c                    V P                  \        P                  ! R \        P                  P
                  ^ ^4      4       R# )rP   N)r   rU   rV   r   r   rW   rj   s   &r   
test_mtimeCompileallTestsBase.test_mtimey   s.    fkk'9>>3N3N*+Q0 	1r   c                (    V P                  R 4       R# )s       N)r   rj   s   &r   test_magic_number%CompileallTestsBase.test_magic_number~   s    k*r   c                   V P                   V P                  3 F  p \        P                  ! V4       K  	  V P	                  \
        P                  ! V P                  R RR7      4       T P	                  \        P                  P                  V P                   4      ;'       d/    \        P                  P                  V P                  4      '       * 4       \        P                  ! V P                   4       V P	                  \
        P                  ! V P                  R RR7      4       T P	                  \        P                  P                  V P                   4      ;'       d*    \        P                  P                  V P                  4      4       \        P                  ! V P                   4       \        P                  ! V P                  4       V P                  4        V P                  \
        P                  ! V P                  R ^R7      4       V P                  \
        P                  ! V P                  R ^R7      4       R#     EK5  ; i)FTru   N)r<   r@   r"   unlinkrg   rh   ri   r;   r9   isfiler   r5   rL   assertFalserK   )rF   fns   & r   test_compile_files&CompileallTestsBase.test_compile_files   s   <</B		" 0
 	
//0@0@6;4I 	Jt||4 : :GGNN4==99	;
		$,,
..t~~U59; 	<t||4 6 6t}}5	7
		$,,
		$--   "001E1E7<AG 	H//6;1F 	G#s   IIc           	        V P                  \        P                  P                  V P                  4      4       \
        P                  ! 4       ;_uu_ 4       pV P                  \        P                  ! \        V P                  4      4      4       R R R 4       V P                  XP                  4       R4       V P                  \        P                  P                  V P                  4      4       R #   + '       g   i     Lj; i)Nz&Compiling ([^WindowsPath|PosixPath].*))r   r"   r9   r   r<   r   captured_stdoutrg   rh   ri   r   r;   assertRegexgetvalue)rF   stdouts   & r   test_compile_file_pathlike.CompileallTestsBase.test_compile_file_pathlike   s    56$$&&&OOJ33HT=M=M4NOP '*,UVt||45 '&s   9C11D	c                n   V P                  \        P                  P                  V P                  4      4       V P                  \        P                  ! \        V P                  4      \        R 4      ^R7      4       V P                  \        P                  P                  V P                  4      4       R# )	ddir_path)ddirrw   N
r   r"   r9   r   r<   rg   rh   ri   r   r;   rj   s   &r   test_compile_file_pathlike_ddir3CompileallTestsBase.test_compile_file_pathlike_ddir   sq    56
//9I9I0J5=k5J679 	: 	t||45r   c                n   V P                  \        P                  P                  V P                  4      4       V P                  \        P                  ! \        V P                  4      \        R 4      ^R7      4       V P                  \        P                  P                  V P                  4      4       R# stripdir_path)stripdirrw   Nr   rj   s   &r   #test_compile_file_pathlike_stripdir7CompileallTestsBase.test_compile_file_pathlike_stripdir   sq    56
//9I9I0J9A/9R679 	: 	t||45r   c                n   V P                  \        P                  P                  V P                  4      4       V P                  \        P                  ! \        V P                  4      \        R 4      ^R7      4       V P                  \        P                  P                  V P                  4      4       R# prependdir_path)
prependdirrw   Nr   rj   s   &r   %test_compile_file_pathlike_prependdir9CompileallTestsBase.test_compile_file_pathlike_prependdir   sr    56
//9I9I0J;CDU;V679 	: 	t||45r   c           
     (   \         P                  P                  P                  V P                  .R 7      ;_uu_ 4        V P                  \        P                  ! ^R7      4       RRR4       \         P                  P                  P                  V P                  .R 7      ;_uu_ 4        V P                  4        V P                  \        P                  ! RR^R7      4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)r9   rw   NFT)skip_curdirrv   rw   )
testtest_importlibr   import_stater5   rg   rh   compile_pathrL   r   rj   s   &r   test_compile_path%CompileallTestsBase.test_compile_path   s      %%228H2IIOOJ33!<= J   %%228H2II$$&Z44;?qJ K JI JI JIIs   'C-*9D -C=	 D	c                   \         P                  P                  V P                  R 4      p\         P                  P                  VR4      p\         P                  ! V4       \        VR4      ;_uu_ 4         RRR4       \        P                  ! V4       V P                  \         P                  P                  \         P                  P                  VR4      4      4       R#   + '       g   i     Lt; i)rX   rG   rt   N__pycache__)
r"   r9   r:   r5   rC   r=   rh   ri   r   exists)rF   data_dir	data_files   &  r   test_no_pycache_in_non_package2CompileallTestsBase.test_no_pycache_in_non_package   s     77<<7GGLL62	
)T"" #	*X}(MNO #"s   5C##C3	c                    V P                  4        \        P                  ! \        P                  ! 4       4      ;_uu_ 4        V P                  \        P                  ! V P                  4      4       R R R 4       R #   + '       g   i     R # ; ir!   )	rL   rc   rd   re   rf   r   rh   ri   rK   rj   s   &r   #test_compile_file_encoding_fallback7CompileallTestsBase.test_compile_file_encoding_fallback   sS      "''66Z44T5I5IJK 7666s   0A<<B	c                j   Rw  r\         P                  ! T P                  RTR7       \        P                  P                  T P                  TR7      pT P                  \        P                  P                  T4      4       \        P                  P                  T P                  TR7      pT P                  \        P                  P                  T4      4       \        P                  P                  T P                  TR7      pT P                  \        P                  P                  T4      4       R# )FTrw   optimizer   N)r   r   )rh   r   r5   r   r   r   r;   rg   r"   r9   r   r?   rD   )rF   r   r   cachedcached2cached3s   &     r   test_optimize!CompileallTestsBase.test_optimize   s     29t~~THM11$2B2B?B 2 Dv./..2243D3D@C 3 Ew/0..2243D3D@C 3 Ew/0r   c                   V P                  \        P                  P                  V P                  4      4       \
        P                  ! 4       ;_uu_ 4       p\        P                  ! \        V P                  4      4       R R R 4       XP                  4       P                  4       ^ ,          pV P                  VR4       V P                  \        P                  P                  V P                  4      4       R #   + '       g   i     L; i)Nz$Listing ([^WindowsPath|PosixPath].*))r   r"   r9   r   r<   r   r   rh   r   r   r5   r   
splitlinesr   rg   )rF   r   lines   &  r   test_compile_dir_pathlike-CompileallTestsBase.test_compile_dir_pathlike   s    56$$&&&""8DNN#;< ' ++-a0FGt||45	 '&s   *C99D		c                n   V P                  \        P                  P                  V P                  4      4       V P                  \        P                  ! \        V P                  4      \        R 4      ^R7      4       V P                  \        P                  P                  V P                  4      4       R# r   
r   r"   r9   r   r<   rg   rh   r   r   r5   rj   s   &r   "test_compile_dir_pathlike_stripdir6CompileallTestsBase.test_compile_dir_pathlike_stripdir   so    56
..x/G8@8Q568 	9 	t||45r   c                n   V P                  \        P                  P                  V P                  4      4       V P                  \        P                  ! \        V P                  4      \        R 4      ^R7      4       V P                  \        P                  P                  V P                  4      4       R# r   r   rj   s   &r   $test_compile_dir_pathlike_prependdir8CompileallTestsBase.test_compile_dir_pathlike_prependdir   sp    56
..x/G:BCT:U568 	9 	t||45r   requires multiprocessingz&concurrent.futures.ProcessPoolExecutorc                    \         P                  ! V P                  R ^R7       V P                  VP                  4       R# Trw   workersNrh   r   r5   rg   calledrF   	pool_mocks   &&r   test_compile_pool_called,CompileallTestsBase.test_compile_pool_called   s,     	t~~T1E	(()r   c                    V P                  \        R 4      ;_uu_ 4        \        P                  ! V P                  RR7       RRR4       R#   + '       g   i     R# ; i)z%workers must be greater or equal to 0)r   N)assertRaisesRegex
ValueErrorrh   r   r5   rj   s   &r   !test_compile_workers_non_positive5CompileallTestsBase.test_compile_workers_non_positive   sI    ##J$KM M""4>>2>M M M Ms   #AA	c                    \         P                  ! V P                  R ^ R7       V P                  VP                  ^,          R,          R4       R# )Tr   max_workersN)rh   r   r5   r~   	call_argsr   s   &&r   test_compile_workers_cpu_count2CompileallTestsBase.test_compile_workers_cpu_count  s:     	t~~T1E,,Q/>Er   zcompileall.compile_filec                    \         P                  ! V P                  R R7       V P                  VP                  4       V P                  VP                  4       R# )Tr   N)rh   r   r5   r   r   rg   )rF   compile_file_mockr   s   &&&r   test_compile_one_worker+CompileallTestsBase.test_compile_one_worker  s?     	t~~T:))*)001r   Nnewc                    \         P                  ! V P                  R ^R7       V P                  VP                  4       R# r   r   )rF   r   s   &&r   $test_compile_missing_multiprocessing8CompileallTestsBase.test_compile_missing_multiprocessing  s-     	t~~T1E)001r   c                   ^pV P                   p\        ^V^,           4       F}  p\        P                  P	                  VRV 24      p\        P                  P	                  VR4      p\        P
                  ! V4       \        P                  ! V P                  V4       K  	  \        P                  P                  X4      p\        P                  ! V P                   RV^,
          R7       V P                  \        P                  P                  V4      4       \        P                  ! V P                   RVR7       V P!                  \        P                  P                  V4      4       R# )   dir_z	script.pyT)rw   	maxlevelsN)r5   ranger"   r9   r:   rC   r7   rA   r;   r   r   r   rh   r   r   r   rg   )rF   depthr9   isourcepyc_filenames   &     r   test_compile_dir_maxlevels.CompileallTestsBase.test_compile_dir_maxlevels  s    ~~q%!)$A77<<QCj1DWW\\$4FHHTNOOD,,f5	 %
 !~~77?t~~TUQYO56t~~TUK|45r   parallelTc                  R R.pV P                   p. pV Fw  p\        P                  P                  WF4      p\        P                  ! V4       \
        P                  ! VRR4       VP                  \
        P                  ! VRR4      4       Ky  	  V'       d   V P                  \        4       \        P                  ! V P                   RTV'       d   ^M^R7       V P                  V4       V EF  pV P                  WpP                   4       \        P                  P!                  V4      pV\#        V P                   \        P$                  ,           4      R p	\
        P&                  ! V4      w   r\        P                  P                  W4      p\(        P*                  P                  P-                  V4      pV P/                  VP0                  V4       V P3                  R	V R	2\        P4                  ! V4      4       EK  	  R# )
r   foo__init__r   modzdef fn(): 1/0
fn()
T)rw   r   r   N")r5   r"   r9   r:   rC   r
   make_scriptappendr6   multiprocessing_cleanup_testsrh   r   rg   assertStartsWithr   r   r   r   sepassert_python_failurer   r   get_code_from_pycr~   co_filenameassertInfsdecode)rF   r   r   fullpathr9   modssubdirr  modcodemodpath_errexpected_inmod_code_objs   &$$           r   _test_ddir_only#CompileallTestsBase._test_ddir_only+  s{   E?~~F77<<-DHHTN%%dJ;KK11$2IK L	  OO9:d%1	. 	C!!#~~6nn66s;G#dnnRVV3456G%;;GDIAq'',,t5K..33EEgNL\55{CMMAk]!,bkk#.>? r   c                (    V P                  R RR7      # )
<a prefix>Fr   r   r  rj   s   &r   test_ddir_only_one_worker-CompileallTestsBase.test_ddir_only_one_workerH  s    ###FFr   c                (    V P                  R RR7      # )r  Tr  r  rj   s   &r   test_ddir_multiple_workers.CompileallTestsBase.test_ddir_multiple_workersL  s     ###EEr   c                (    V P                  R RR7      # )r   Fr  r  rj   s   &r   test_ddir_empty_only_one_worker3CompileallTestsBase.test_ddir_empty_only_one_workerQ  s    ##e#<<r   c                (    V P                  R RR7      # )r   Tr  r  rj   s   &r    test_ddir_empty_multiple_workers4CompileallTestsBase.test_ddir_empty_multiple_workersU  s     ##d#;;r   c                   . ROp\         P                  P                  ! V P                  .VO5!  p\         P                  ! V4       \
        P                  ! VR R4      p\        P                  P                  V4      p\         P                  P                  ! V P                  .VR,          O5!  p\        P                  ! VRVR7       \
        P                  ! V4      w  rgp\         P                  P                  ! VR,          !  p	V P                  V	\        V\        P                   ! 4       R7      4       V P#                  V\        V\        P                   ! 4       R7      4       R# )	r   1 / 0Nr   NTrw   r   r   NNr0   Nr   buildrealr9   r"   r9   r:   r5   makedirsr
   r  r   r   r   rh   r   r	  r  strsysgetdefaultencodingassertNotIn)
rF   r  r9   r   r   r   rcoutr  r  s
   &         r   test_strip_only#CompileallTestsBase.test_strip_onlyZ  s    4ww||DNN6X6
D**4A^^--f577<<>">t4(C$::2>ggllHRL1c4467	
 	c4467	
r   c                   . R
Op\         P                  P                  ! V P                  .VO5!  p\         P                  ! V4       \
        P                  ! VR R4      p\        P                  P                  V4      p\         P                  P                  ! V P                  .VR,          R.,           O5!  p\        P                  ! 4       ;_uu_ 4       p\        P                  ! VRVR7       RRR4       V P                  RXP                  4       4       \
        P                   ! V4      w  rvp\         P                  P                  ! V P                  .VR,          O5!  p	V P                  V\#        V\$        P&                  ! 4       R	7      4       V P)                  V	\#        V\$        P&                  ! 4       R	7      4       V P)                  V\#        V\$        P&                  ! 4       R	7      4       R#   + '       g   i     EL; i)r   r)  r*  fakeTr+  Nznot a valid prefixr,  r0   r-  )r"   r9   r:   r5   r1  r
   r  r   r   r   r   r   rh   r   r  r   r	  r2  r3  r4  r5  )
rF   r  r9   r   r   r   r7  r6  r  expected_not_ins
   &         r   test_strip_only_invalid+CompileallTestsBase.test_strip_only_invalidm  sf   4ww||DNN6X6
D**4A^^--f577<<K(2,&2IK$$&&#""4thG '*CLLN;$::2>'',,t~~EEc4467	
 	c4467	
 	c4467	
 '&&s   G66H	c                    . ROp\         P                  P                  ! V P                  .VO5!  p\         P                  ! V4       \
        P                  ! VR R4      p\        P                  P                  V4      pRp\        P                  ! VRVR7       \
        P                  ! V4      w  rgp\         P                  P                  ! WPP                  .VO5!  p	V P                  V	\        V\        P                   ! 4       R7      4       R# )r   r)  /fooT)rw   r   r0   Nr-  )r"   r9   r:   r5   r1  r
   r  r   r   r   rh   r   r	  r  r2  r3  r4  )
rF   r  r9   r   r   r   r6  r7  r  r  s
   &         r   test_prepend_only%CompileallTestsBase.test_prepend_only  s    4ww||DNN6X6
D**4A^^--f5
t4JG$::2>ggll:~~IIc4467	
r   c                   . R	Op\         P                  P                  ! V P                  .VO5!  p\         P                  ! V4       \
        P                  ! VR R4      p\        P                  P                  V4      p\         P                  P                  ! V P                  .VR,          O5!  pRp\        P                  ! VRWVR7       \
        P                  ! V4      w  rxp	\         P                  P                  ! V.VR,          O5!  p
V P                  V
\        V	\        P                   ! 4       R7      4       V P#                  V\        V	\        P                   ! 4       R7      4       R# )
r   r)  r*  r@  T)rw   r   r   r,  r0   Nr-  r0  rF   r  r9   r   r   r   r   r6  r7  r  r  s   &          r   test_strip_and_prepend*CompileallTestsBase.test_strip_and_prepend  s   4ww||DNN6X6
D**4A^^--f577<<>">
t4(0	I$::2>ggll:==c4467	
 	c4467	
r   c           
     l   . ROp\         P                  P                  ! V P                  .VO5!  p\         P                  ! V4       \
        P                  ! VR R4       V P                  \        4      ;_uu_ 4        \        P                  ! VRRRRR7       RRR4       R#   + '       g   i     R# ; i)r   r)  Tz/barr@  )rw   r   r   r   N)r   r.  r/  r9   r   )r"   r9   r:   r5   r1  r
   r  assertRaisesr   rh   r   )rF   r  r9   s   &  r   test_strip_prepend_and_ddir/CompileallTestsBase.test_strip_prepend_and_ddir  sz    <ww||DNN6X6
D!!$8z**""4t&,2vG +***s   <B""B3	c                   \         P                  ! V P                  R R4      p. pR F3  pVP                  \        P
                  P                  VVR7      4       K5  	  ^ ^.^^.^ ^.. RO.pV Fv  p\        P                  ! VRVR7       V FT  pV P                  \        P                  P                  W#,          4      4        \        P                  ! W#,          4       KV  	  Kx  	  R#   \         d     Kl  i ; i)test_optimizationa = 0r   Tr   Nr   r   r   r   r   )r
   r  r5   r  r   r   r   rh   ri   rg   r"   r9   r   r   	Exception)rF   r   r   	opt_leveltest_combinationsopt_combinations   &     r   !test_multiple_optimization_levels5CompileallTestsBase.test_multiple_optimization_levels  s    **4>>+>+24 $IIIinn66vDM 7 O P %  VaVaVY?0O##F$-<>,	r} =>IIbm, -  1 ! s   C**C98C9c                0   \         P                  P                  V P                  R RR4      p\         P                  P                  V P                  R RR4      p\         P                  P                  V P                  R RR4      p\         P                  ! V4       \         P                  ! V4       \         P                  ! V4       \
        P                  ! VRR4      p\
        P                  ! VRR4      p\         P                  P                  VR4      p\         P                  P                  VR	4      p\         P                  ! WF4       \         P                  ! WW4       \        P                  P                  V4      p\        P                  P                  V4      p	\        P                  ! VR
VR7       V P                  \         P                  P                  V4      4       V P                  \         P                  P                  V	4      4       R# )r   dirallowedsymlinks
prohibitedtest_allowedrM  test_prohibitedtest_allowed.pytest_prohibited.pyT)rw   limit_sl_destN)r"   r9   r:   r5   r1  r
   r  symlinkr   r   r   rh   r   rg   r   r   
rF   allowed_pathsymlinks_pathprohibited_pathallowed_scriptprohibited_scriptallowed_symlinkprohibited_symlink
allowed_bcprohibited_bcs
   &         r   test_ignore_symlink_destination3CompileallTestsBase.test_ignore_symlink_destination  s]    ww||DNNFE9MT^^VUJO'',,t~~vulS
L!
M"
O$ '22<QXY)55oGXZab'',,}6GHWW\\-9MN


>3


$9^^55oF
!889KL}DUz2367r   )rK   r<   r@   r5   r;   r?   rD   rB   )2__name__
__module____qualname____firstlineno__rH   rL   r[   rk   rp   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   _have_multiprocessingr   patchr   r   r   r   r   r   r  r  r   r#  r&  r8  r=  rA  rE  rI  rS  r	   skip_unless_symlinkrj  __static_attributes____classdictcell____classdict__s   @r   r+   r+   6   s    =  
GG4 1
+G26666K
PL1666 %'AB	ZZ89* : C*?
 %'AB	ZZ89F : CF %'AB	ZZ89	ZZ)*2 + : C2
 %'AB	ZZ8dC	ZZ)*2 + D C26"@ @:G %'ABF CF= %'AB< C<
&
2

*G& ""8 #8r   r+   c                       ] tR tRtRtR# )CompileallTestsWithSourceEpochi   Nrl  rm  rn  ro  rs  ry  r   r   rx  rx         	r   rx  )	metaclasssource_date_epochc                       ] tR tRtRtR# )!CompileallTestsWithoutSourceEpochi  ry  Nrz  ry  r   r   r  r    r{  r   r  z tempdir is not encodable on WASIc                   2   a  ] tR tRt o R tR tR tRtV tR# )EncodingTesti  c                4   \         P                  ! 4       V n        \        P                  P                  V P                  R 4      V n        \        V P                  RRR7      ;_uu_ 4       pVP                  R4       RRR4       R#   + '       g   i     R# ; i)r-   r.   r/   r0   u   b"€"N)	r3   r4   r5   r"   r9   r:   r;   r=   r>   rE   s   & r   rH   EncodingTest.setUp  sa    !))+77<<
C$""C'::d JJ{# ;:::s   *BB	c                F    \         P                  ! V P                  4       R # r!   )r7   r8   r5   rj   s   &r   tearDownEncodingTest.tearDown  s    dnn%r   c                   \         P                  ! \         P                  ! 4       R R7      p\        P                  ! V4      ;_uu_ 4        \
        P                  ! V P                  4      pRRR4       V P                  X4       VP                  ^ 4       VP                  4       pV P                  RV4       V P                  RV4       R#   + '       g   i     Lh; i)asciir0   Nz<SyntaxError: bytes can only contain ASCII literal charactersUnicodeEncodeError)re   TextIOWrapperBytesIOrc   rd   rh   r   r5   r   seekrR   r  r5  )rF   buffercompiledress   &   r   
test_errorEncodingTest.test_error   s    !!"**,A''//!--dnn=H 0"AkkmJ	
 	-s3 0/s   
!CC	)r5   r;   N)	rl  rm  rn  ro  rH   r  r  rs  rt  ru  s   @r   r  r    s     
$&4 4r   r  c                     a  ] tR tRt o R t]P                  R 4       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RR. 3RRR.3RRR.33 F  w  ttt]]3R lt]]! 4       R],           &   K!  	  R tR t]R 4       tR tR t]P<                  R 4       tR t R t!R t"R  t#R! t$]PJ                  R" 4       t&R# t'R$ t(R% t)R& t*R' t+R( t,R) t-].! ]/R*4      R+ 4       t0]1Pd                  ! R,4      R- 4       t3R. t4R/ t5]P<                  R0 4       t6R1 t7R2 t8R3t9V t:R4# )5CommandLineTestsBasei  c                &   \         P                  ! 4       V n        V P                  \        P
                  V P                  4       \        P                  P                  V P                  R 4      V n	        \        P                  ! V P                  4       \        P                  P                  V P                  R4      V n        \        P                  ! V P                  RR4      V n        \        P                  ! V P                  RR4      V n        R# )r   r   r  r   barN)r3   r4   r5   r6   r	   r8   r"   r9   r:   pkgdirrC   pkgdir_cachedirr
   r  initfnbarfnrj   s   &r   rH   CommandLineTestsBase.setUp  s    !))+	(($..9ggll4>>59
!ww||DKKG#//ZL"..t{{E2F
r   c              #     "   \         P                  p\        P                  P	                  V P
                  R 4      p V\         n        RV P
                  RV/x  V\         n        R#   T\         n        i ; i5i)__testcache__
PYTHONPATHPYTHONPYCACHEPREFIXN)r3  pycache_prefixr"   r9   r:   r5   )rF   
old_prefix
new_prefixs   &  r   temporary_pycache_prefix-CommandLineTestsBase.temporary_pycache_prefix  sa      ''
WW\\$../B
	,!+Cdnn%z 
 ",CCs   ;A8A( A8(A55A8c                @    . \         P                  ! 4       OR NRNRNVO# )z-S-mrh   )r   !optim_args_from_interpreter_flags)rF   argss   &&r   _get_run_args"CommandLineTestsBase._get_run_args)  s<    ::< ( 	r   c                    \         P                  ! V P                  V4      / VBR R/B w  r4pV P                  RV4       V# )PYTHONIOENCODINGr/   r   )r
   assert_python_okr  r~   rF   r  env_varsr6  r7  r  s   &*,   r   assertRunOK CommandLineTestsBase.assertRunOK.  sK    $55,,T236>3*13 	c"
r   c                b    \         P                  ! V P                  V4      / VBR R/B w  r4pW4V3# )r  r/   )r
   r	  r  r  s   &*,   r   assertRunNotOK#CommandLineTestsBase.assertRunNotOK5  s@    $::++D125=2)02 |r   c                    \         P                  P                  V4      pV P                  \        P
                  P                  V4      4       R # r!   )r   r   r   rg   r"   r9   r   rF   r   r9   s   && r   assertCompiled#CommandLineTestsBase.assertCompiled;  s/    ~~//3t,-r   c                    \         P                  P                  V4      pV P                  \        P
                  P                  V4      4       R # r!   )r   r   r   r   r"   r9   r   r  s   && r   assertNotCompiled&CommandLineTestsBase.assertNotCompiled?  s1    ~~//3-.r   c                f   \         P                  ! V P                  R R4      pV P                  4       ;_uu_ 4       pV P                  ! R/ VB  V P                  V4       V P                  V P                  4       V P                  V P                  4       RRR4       R#   + '       g   i     R# ; i)bazr   Nry  )	r
   r  r5   r  r  r  r  r  r  )rF   bazfnenvs   &  r   test_no_args_compiles_path/CommandLineTestsBase.test_no_args_compiles_pathC  s}    ))$..%D**,,#s#&""4;;/""4::.	 -,,,s   ABB0	cpuc                   \         P                  ! V P                  R R4      pV P                  4       ;_uu_ 4       pV P                  ! R/ VB  \
        P                  P                  V4      pRRR4       \        P                  ! X\        P                  ! 4       ^<,
          3^,          4       \        P                  ! V4      P                  pV P                  ! R/ XB  \        P                  ! V4      P                  pV P                  WE4       V P                  ! R/ VB  \        P                  ! V4      P                  pV P                  WE4       R#   + '       g   i     L; i)r  r   Nry  )-f)r
   r  r5   r  r  r   r   r   r"   r_   timer#   rT   r~   r   )rF   r  r  pycpathrY   mtime2s   &     r    test_no_args_respects_force_flag5CommandLineTestsBase.test_no_args_respects_force_flagL  s     ))$..%D**,,#s#nn66u=G - 	499;r>+A-. ))3!**'%%!**E* -,s   2EE&	c                B   \         P                  ! V P                  R R4       V P                  4       ;_uu_ 4       pV P                  ! R/ VB pRRR4       V P                  RX4       V P                  ! R/ XB pV P                  RV4       R#   + '       g   i     LH; i)r  r   Ns   Listing ry  )-q)r
   r  r5   r  r  r  r5  )rF   r  noisyrw   s   &   r    test_no_args_respects_quiet_flag5CommandLineTestsBase.test_no_args_respects_quiet_flag_  s{    !!$..%<**,,$$+s+E -k5)  --e,	 -,s   BB	normalpycr   z	opt-1.pyc-Odoubleoptimizez	opt-2.pycz-OOc                   a \         P                  ! VR RRV P                  .,           !   V P                  \        P
                  P                  V P                  4      4       \        V3R lR 4       4      pV P                  \        \        P                  ! V P                  4      4      V4       T P                  \        P                  ! V P                  4       Uu. uF  pVP                  S4      '       g   K  VNK   	  up4       R# u upi )r  rh   r  c              3   x   <"   T F/  pVP                  \        P                  P                  S4      x  K1  	  R # 5ir!   )formatr3  implementation	cache_tag).0baseexts   & r   	<genexpr>)CommandLineTestsBase.f.<locals>.<genexpr>t  s3      K*I$ #kk#*<*<*F*FLL*Is   7:N)z__init__.{}.{}z	bar.{}.{})r
   r  r  rg   r"   r9   r   r  sortedr~   listdirr   endswith)rF   r  switchexpectedr   s   &f&  r   fCommandLineTestsBase.fo  s    **V|T4;;7.8 : OOBGGNN4+?+?@A K*IK KHVBJJt/C/C$DExP2::dkk+B 3+BR!#S!1 !b+B 3 4 3s   D<Dtest_pep3147_paths_c                <   V P                  R RV P                  4       V P                  \        P                  P                  V P                  4      4       \        . RO4      pV P                  \        \        P                  ! V P                  4      4      V4       R# )z-br  N)__init__.pyz__init__.pyczbar.pyzbar.pyc)
r  r  r   r"   r9   r   r  r  r~   r  )rF   r  s   & r   test_legacy_paths&CommandLineTestsBase.test_legacy_paths|  sl     	tT[[1(<(<=> & '

4;; 78(Cr   c                b   V P                  R V P                  4       V P                  \        P                  P                  V P                  4      4       \        P                  P                  V P                  R4      pV P                  \        P                  P                  V4      4       V P                  R V P                  4       V P                  \        P                  P                  V P                  4      4       V P                  \        P                  P                  V4      4       R# )r  r   N)	r  r  rg   r"   r9   r   r  r:   r   )rF   cachecachedirs   & r   test_multiple_runs'CommandLineTestsBase.test_multiple_runs  s     	t{{+t';';<=T%9%9=I67t{{+t';';<=67r   c                x   V P                  R V P                  4       \        P                  P	                  V P
                  4      p\        P                  ! V\        P                  ! 4       ^<,
          3^,          4       \        P                  ! V4      P                  pV P                  R V P                  4       \        P                  ! V4      P                  pV P                  W#4       V P                  R RV P                  4       \        P                  ! V4      P                  pV P                  W#4       R# )r  r  N)r  r  r   r   r   r  r"   r_   r  r#   rT   r~   r   )rF   r  rY   r  s   &   r   
test_forceCommandLineTestsBase.test_force  s    t{{+..224::>
499;r>+A-. ))t{{+!**'tT[[1!**E*r   c                V   \         P                  P                  V P                  R 4      p\         P                  ! V4       \
        P                  ! VRR4      p\
        P                  ! VRR4      pV P                  RRV P                  4       V P                  V4       V P                  \         P                  P                  \         P                  P                  VR4      4      4       V P                  RV P                  4       V P                  V4       V P                  V4       R# )spamr  r   hamr  z-lr   N)r"   r9   r:   r  rC   r
   r  r  r  r   r   r  )rF   
subpackage	subinitfnhamfns   &   r   test_recursion_control+CommandLineTestsBase.test_recursion_control  s    WW\\$++v6

!--j*bI	))*eR@tT[[1y)Z(OPQt{{+I&E"r   c                   \         P                  P                  V P                  R 4      p\         P                  P                  VR4      p\         P                  P                  VR4      pWV3 F  p\        P
                  ! V4       K  	  \         P                  P                  VR4      p\        P                  ! VRR4      p\        P                  ! VR R4      p\        P                  ! VRR4      pV P                  RRV P                  4       V P                  V4       V P                  \         P                  P                  \         P                  P                  VR4      4      4       V P                  RR	V P                  4       V P                  V4       V P                  V4       V P                  V4       V P                  RR
V P                  4       V P                  V4       V P                  V4       V P                  V4       V P                  V4       V P                  RRV P                  4       V P                  V4       V P                  V4       V P                  V4       V P                  V4       R# )r  r  eggsr  r   eggr  z-r 0r   z-r 1z-r 2z-r 5N)r"   r9   r:   r  r
   make_pkgr  r  r  r   r   r  )	rF   r  subpackage2subpackage3pkgr  r  spamfneggfns	   &        r   test_recursion_limit)CommandLineTestsBase.test_recursion_limit  s   WW\\$++v6
ggll:u5ggll;7[9C""3' : GGLL];	))*eR@**;C))+ubAvt{{3y)GGNN277<<
MBC	E 	vt{{3I&E"v&vt{{3I&E"F#u%vt{{3I&E"F#E"r   c           	     
   \         P                  P                  V P                  R 4      p\        P
                  ! V4       \         P                  ! R\         P                  P                  VR4      4       \         P                  ! R\         P                  P                  VR4      4       V P                  RV P                  4       V P                  \         P                  P                  V P                  R RRR4      4       R# )r  .evilevil2r  r  N)	r"   r9   r:   r  r
   r  r_  r  r  )rF   r  s   & r   test_symlink_loop&CommandLineTestsBase.test_symlink_loop  s    
 ggll4;;/s#


3S&12


3S'23t{{+BGGLLKK-
 	r   c                    V P                  V P                  4      pV P                  R V P                  4      pV P                  RV4       V P                  RV4       R# )r  r   N)r  r  r   r~   )rF   r  rw   s   &  r   
test_quietCommandLineTestsBase.test_quiet  sL      -  t{{3C'e$r   c                   \         P                  ! V P                  R R4       V P                  RV P                  4      w  rpV P                  RV P                  4      w  rpV P	                  RV4       V P                  RV4       R# )crunchyfrog
bad(syntaxr  z-qqr   N)r
   r  r  r  r   r~   )rF   r  rw   silents   &   r   test_silent CommandLineTestsBase.test_silent  sl    !!$++}lK))$<!**5$++>1C'f%r   c                    V P                  R RRV P                  4       V P                  V P                  4       V P	                  V P
                  4       R# )r  z-xz
ba[^\\/]*$N)r  r  r  r  r  r  rj   s   &r   test_regexp CommandLineTestsBase.test_regexp  s>    t]DKK@tzz*DKK(r   c                   \         P                  P                  V P                  R 4      p\         P                  ! V4       \
        P                  ! VRR4      p\
        P                  ! VRR4      pV P                  RV P                  V4       V P                  V P                  4       V P                  V P                  4       V P                  V4       V P                  V4       R# )foo2r  r   bar2r  N)r"   r9   r:   r5   rC   r
   r  r  r  r  r  r  )rF   pkgdir2init2fnbar2fns   &   r   test_multiple_dirs'CommandLineTestsBase.test_multiple_dirs  s    '',,t~~v6
++GZD**7FB?t{{G4DKK(DJJ'G$F#r   c                    \         P                  ! V P                  R R4       V P                  RRRV P                  4      w  rpV P	                  VR4       R# )r  r  r  -ddinsdale   File "dinsdaleN)r
   r  r  r  r   rF   r6  r7  r  s   &   r   test_d_compile_error)CommandLineTestsBase.test_d_compile_error  sG    !!$++}lK**4z4;;O/0r   c                   \         P                  ! V P                  R R4      pV P                  RRRV P                  4       \         P                  ! V P                  RR4      p\        P
                  P                  V4      p\        P                  ! V\        P                  P                  V P                  R4      4       \        P                  ! V4       \         P                  ! VRR	7      w  rEpV P                  VR
4       R# )r  zraise Exceptionr  r  r  bingz
import bazzbaz.pycF)
__isolatedr  N)r
   r  r  r  r   r   r   r"   renamer9   r:   remover	  r   )rF   r  r   r  r6  r7  r  s   &      r   test_d_runtime_error)CommandLineTestsBase.test_d_runtime_error  s    ))$++u>OPtZ=&&t{{FLInn..u5
		#rww||DKK;<
		%$::2%P/0r   c                   V P                  R \        P                  P                  V P                  R4      V P
                  4      w  rpV P                  VR4       V P                  VR4       V P                  \        P                  P                  \        P                  P                  V P                  4      4      4       R# )-i
nosuchfiles   rror.*nosuchfiles	   TracebackN)r  r"   r9   r:   r5   r  r   assertNotRegexr   r   r   r   r   r  r   s   &   r   test_include_bad_file*CommandLineTestsBase.test_include_bad_file  s    **"'',,t~~|<dkkK12C.	(H(H,0,@,@)B C 	Dr   c                    \         P                  ! V P                  R R4      p\         P                  ! V P                  RR4      p\         P                  ! V P                  RR4      p\         P                  ! V P                  RR4      p\        \        P
                  P                  V P                  R4      RRR7      ;_uu_ 4       pVP                  \        P
                  P                  V P                  R	4      \        P                  ,           4       VP                  \        P
                  P                  V P                  R
4      \        P                  ,           4       RRR4       V P                  R\        P
                  P                  V P                  R4      V4       V P                  V4       V P                  V4       V P                  V4       V P                  V4       R#   + '       g   i     L; i)f1r   f2f3f4l1r.   r/   r0   f1.pyf2.pyNr+  )r
   r  r  r=   r"   r9   r:   r5   r>   linesepr  r  r  rF   r1  r2  r3  r4  r5  s   &     r   test_include_file_with_arg/CommandLineTestsBase.test_include_file_with_arg  sF   &&t{{D"=&&t{{D"=&&t{{D"=&&t{{D"="'',,t~~t4cGLLPRHHRWW\\$++w7

BCHHRWW\\$++w7

BC M 	rww||DNNDA2FBBr"B MLs   BG--G=	c                b   \         P                  ! V P                  R R4      p\         P                  ! V P                  RR4      p\         P                  ! V P                  RR4      p\         P                  ! V P                  RR4      p\        \        P
                  P                  V P                  R4      RRR7      ;_uu_ 4       pVP                  \        P
                  P                  V P                  R	4      \        P                  ,           4       R
R
R
4       V P                  R\        P
                  P                  V P                  R4      4       V P                  V4       V P                  V4       V P                  V4       V P                  V4       R
#   + '       g   i     L; i)r1  r   r2  r3  r4  r5  r.   r/   r0   r7  Nr+  )r
   r  r  r=   r"   r9   r:   r5   r>   r8  r  r  r  r9  s   &     r   test_include_file_no_arg-CommandLineTestsBase.test_include_file_no_arg"  s   &&t{{D"=&&t{{D"=&&t{{D"=&&t{{D"="'',,t~~t4cGLLPRHHRWW\\$++w7

BC Mrww||DNNDABr"Br"r" MLs   AFF.	c                   \         P                  ! V P                  R R4      p\         P                  ! V P                  RR4      p\         P                  ! V P                  RR4      p\         P                  ! V P                  RR4      p\         P                  ! V P	                  R	4      RR.,           !  pVP
                  P                  V\        P                  ,           P                  R4      4       \         P                  ! V4       V P                  V4       V P                  V4       V P                  V4       V P                  V4       R# )
r1  r   r2  r3  r4  r+  -r  Nry  )r
   r  r  spawn_pythonr  stdinr>   r"   r8  encodekill_pythonr  r  )rF   r1  r2  r3  r4  ps   &     r   test_include_on_stdin*CommandLineTestsBase.test_include_on_stdin/  s    &&t{{D"=&&t{{D"=&&t{{D"=&&t{{D"=&&););B)?4+)MO	r"**},,W56!!!$r"r"Br"r   c                P   \         P                  ! V P                  R R4      pV P                  RV P                  WP
                  4      w  r#pV P                  VR4       V P                  V4       V P                  V P                  4       V P                  V P
                  4       R# )r$  zsyntax(errorr,  s   rrorN)	r
   r  r  r  r  r  r   r  r  )rF   bingfnr6  r7  r  s   &    r   !test_compiles_as_much_as_possible6CommandLineTestsBase.test_compiles_as_much_as_possible<  s    **4;;O**<+1::?g&v&DKK(DJJ'r   c                L    V P                  R 4      pV P                  VR4       R# )badfilenames   Can't list 'badfilename'N)r  r   )rF   r7  s   & r   !test_invalid_arg_produces_message6CommandLineTestsBase.test_invalid_arg_produces_messageE  s#    }-9:r   c                   \         P                  ! V P                  R R4       \        P                  P                  \        P                  P                  V P                  R4      4      pV P                  RV P                  4       \        VR4      ;_uu_ 4       pVP                  4       pRRR4       V P                  \        P                  XR,          R4      ^4       V P                  RV P                  4       \        VR4      ;_uu_ 4       pVP                  4       pRRR4       V P                  \        P                  VR,          R4      ^4       R#   + '       g   i     L; i  + '       g   i     LR; i)	r1  r   r6  z --invalidation-mode=checked-hashrO   N:      Nlittlez"--invalidation-mode=unchecked-hash)r
   r  r  r   r   r   r"   r9   r:   r  r=   rR   r~   rS   
from_bytes)rF   r  fprX   s   &   r   test_pyc_invalidation_mode/CommandLineTestsBase.test_pyc_invalidation_modeI  s    !!$++tR8nn..GGLLg.0;T[[I#t__779D S	8<dC=t{{K#t__779D S	8<dC _ _s   EE+E(	+E;	r   c                   \         P                  ! V P                  R R4      p. p\        ^4       F  p\        P
                  P                  V P                  RP                  V4      4      p\        P                  ! V4       \         P                  ! VRR4      pVP                  \         P                  ! VR R4      4       K  	  V P                  V P                  RR4       V P                  V4       V F  pV P                  V4       K  	  R# )r  r   zfoo{}r  z-j0N)r
   r  r5   r   r"   r9   r:   r  rC   r  r  r  )rF   r  filessuffixr  r   rG   s   &      r   test_workers!CommandLineTestsBase.test_workersV  s    **4>>62FAhFWW\\$..'..2HIFHHV**6:rBBLL22662FG	  	s3F#D% r   zcompileall.compile_dirc                j   \         P                  ! R \        P                  V P                  R.R7      ;_uu_ 4        \
        P                  ! 4        V P                  VP                  4       V P                  VP                  R,          R,          ^ 4       RRR4       R#   + '       g   i     R# ; i)zsys.argvz-j0r   r   Nr   )r   rq  r3  
executabler5   rh   mainrg   r   r~   r   )rF   r   s   &&r   test_workers_available_cores1CommandLineTestsBase.test_workers_available_corese  s~    ZZ
 ^^T^^UCE EOOOOK../[2226yA1E	E E E Es   AB!!B2	c                   . R	Op\         P                  P                  ! V P                  .VO5!  p\         P                  ! V4       \
        P                  ! VR R4      p\        P                  P                  V4      p\         P                  P                  ! V P                  .VR,          O5!  pRpV P                  RVRWb4       \
        P                  ! V4      w  rxp	\         P                  P                  ! V.VR,          O5!  p
V P                  V
\        V	\        P                  ! 4       R7      4       V P!                  V\        V	\        P                  ! 4       R7      4       R# )
r   r)  r*  r@  z-sz-pr,  r0   Nr-  )r"   r9   r:   r5   r1  r
   r  r   r   r   r  r	  r  r2  r3  r4  r5  rD  s   &          r   rE  +CommandLineTestsBase.test_strip_and_prependm  s   4ww||DNN6X6
D**4A^^--f577<<>">
xz@$::2>ggll:==c4467	
 	c4467	
r   c           
     |   \         P                  P                  V P                  R 4      p\         P                  ! V4       \
        P                  ! VRR4      p. pR	 F3  pVP                  \        P                  P                  VVR7      4       K5  	  RR.RR.RR.. R
O.pV F  pV P                  ! V.R V 4       O5!   V F^  pV P                  \         P                  P                  V\        V4      ,          4      4        \         P                  ! W4,          4       K`  	  K  	  R#   \          d     Kv  i ; i)optimizationsrL  rM  r   rY  12c              3   F   "   T F  pR \        V4      ,           x  K  	  R# 5i)z-oN)r2  )r  ns   & r   r  ICommandLineTestsBase.test_multiple_optimization_levels.<locals>.<genexpr>  s     $LOqTCF]]Os   !NrN  )rY  rg  rh  )r"   r9   r:   r5   r1  r
   r  r  r   r   r   r  rg   r   rS   r   rO  )rF   r9   r   r   rP  rQ  rR  s   &      r   rS  6CommandLineTestsBase.test_multiple_optimization_levels  s   ww||DNNO<
D**4+>+24 $IIIinn66vDM 7 O P % "3Z!3Z!3Z,.  1OTM$LO$LM,	r#i./A BCIIbm, -  1 ! s   D,,D;:D;c                $   \         P                  P                  V P                  R RR4      p\         P                  P                  V P                  R RR4      p\         P                  P                  V P                  R RR4      p\         P                  ! V4       \         P                  ! V4       \         P                  ! V4       \
        P                  ! VRR4      p\
        P                  ! VRR4      p\         P                  P                  VR4      p\         P                  P                  VR	4      p\         P                  ! WF4       \         P                  ! WW4       \        P                  P                  V4      p\        P                  P                  V4      p	V P                  VR
V4       V P                  \         P                  P                  V4      4       V P                  \         P                  P                  V	4      4       R# )r   rV  rW  rX  rY  rZ  rM  r[  r\  r]  z-eN)r"   r9   r:   r5   r1  r
   r  r_  r   r   r   r  rg   r   r   r`  s
   &         r   rj  4CommandLineTestsBase.test_ignore_symlink_destination  s]    ww||DNNFE9MT^^VUJO'',,t~~vulS
L!
M"
O$ '22<QXY)55oGXZab'',,}6GHWW\\-9MN


>3


$9^^55oF
!889KLl;z2367r   c                @    V P                  V P                  R R4       R# )-o 1--hardlink-dupesN)r  r5   rj   s   &r   test_hardlink_bad_args+CommandLineTestsBase.test_hardlink_bad_args  s     	DNNF4FGr   c                   R EF  p\         P                  ! 4       ;_uu_ 4       pV P                  VR7      ;_uu_ 4        \        P                  ! VRR4      p\        V4      p. ROpV'       d   VP                  R4       V P                  ! V.VO5!   V P                  \        V^ ,          V^,          4      V4       V P                  \        V^,          V^,          4      V4       V P                  \        V^ ,          V^,          4      V4       RRR4       RRR4       EK"  	  R#   + '       g   i     L; i  + '       g   i     EKK  ; i)Tdedupr   rM  rq  N)TF)r  z-o 0rp  z-o 2)
r3   TemporaryDirectorysubTestr
   r  r   r  r  r~   r)   )rF   rv  r9   r   pycsr  s   &     r   test_hardlink"CommandLineTestsBase.test_hardlink  s     #E,,..$\\\..*66tXwOF#F+D9D$67$$T1D1$$[a$q'%BEJ$$[a$q'%BEJ$$[a$q'%BEJ / /. #.. /..s#   D<CD)D<)D94D<<E)r  r5   r  r  r  N);rl  rm  rn  ro  rH   rc   contextmanagerr  r  r  r  r  r  r  r   r   requires_resourcer  r  namer  r  r  localsr  r  r  r  r   r	   rr  r  r	  r  r  r  r!  force_not_colorizedr(  r.  r:  r=  rF  rJ  rN  rV  r   rp  r\  r   rq  ra  rE  rS  rj  rr  rz  rs  rt  ru  s   @r   r  r    s    G , ,
.// u%+ & +" u%- &- 
5"	[4&)	;0c6
 F 
	4 23&-.!$D8 + +
# #D "" #%&)
	$1
   1 !1D ##(;D %'AB& C& 
ZZ()F *F
(. ""8 #80H
K Kr   r  c                       ] tR tRtRtR# )CommandLineTestsWithSourceEpochi  ry  Nrz  ry  r   r   r  r    r{  r   r  c                       ] tR tRtRtR# )CommandLineTestsNoSourceEpochi  ry  Nrz  ry  r   r   r  r    r{  r   r  c                      a  ] tR tRt o R t]P                  R 4       tRR ltRRRRRR	/R
 lt	R t
RR ltR tR tRR ltR tR tR tR tR tRtV tR# )HardlinkDedupTestsBasei  c                    R V n         R # r!   r   rj   s   &r   rH   HardlinkDedupTestsBase.setUp  s	    	r   c              #     "   \         P                  ! 4       ;_uu_ 4       pWn        Vx  R V n        R R R 4       R #   + '       g   i     R # ; i5ir!   )r3   rw  r9   )rF   r9   s   & r   temporary_directory*HardlinkDedupTestsBase.temporary_directory  s5     ((**dIJDI +***s   A<
AA		Ac                D    \         P                  ! V P                  W!4      # r!   )r
   r  r9   )rF   coder~  s   &&&r   r  "HardlinkDedupTestsBase.make_script  s    ((D??r   rv  Tr   rv   Fc               N    \         P                  ! V P                  R VWR7       R# )T)rw   r   hardlink_dupesrv   N)rh   r   r9   )rF   rv  r   rv   s   &$$$r   r   "HardlinkDedupTestsBase.compile_dir  s    tyyx.3	Br   c                
   V P                  4       ;_uu_ 4        V P                  R 4       V P                  \        4      ;_uu_ 4        \        P
                  ! V P                  R^ RR7       RRR4       V P                  \        4      ;_uu_ 4        \        P
                  ! V P                  R^ ^ .RR7       RRR4       RRR4       R#   + '       g   i     Lf; i  + '       g   i     L-; i  + '       g   i     R# ; i)passT)rw   r   r  N)r  r  rH  r   rh   r   r9   rj   s   &r   test_bad_args$HardlinkDedupTestsBase.test_bad_args  s     %%''V$"":..&&tyyq6:< / "":.. &&tyy1v6:< / ('.. /. (''s;   /C1%C	-%C1'C	9C1CC1C.)C11D	c                    . pV'       d   VP                  R 4       VP                  R4       V'       d   VP                  R4       RP                  V4      # )z'module docstring'zx = 1zassert x == 1
)r  r:   )rF   	docstring	assertionliness   &&& r   create_code"HardlinkDedupTestsBase.create_code  sA    LL-.WLL)yyr   c              #  b   "   R F$  pR F  pV P                  WR7      pW1V3x  K  	  K&  	  R# 5i)Fr  r  N)FT)r  )rF   r  r  r  s   &   r   
iter_codes!HardlinkDedupTestsBase.iter_codes  s7     &I*	'')'Q	22 + 's   -/c                d   V P                  4        F  w  rpV P                  W#R 7      ;_uu_ 4        V P                  4       ;_uu_ 4        V P                  V4      p\	        V4      pV P                  RR7       V P                  \        V^ ,          V^,          4      4       V P                  \        V^ ,          V^,          4      4       V P                  \        V^,          V^,          4      4       RRR4       RRR4       K  	  R#   + '       g   i     L; i  + '       g   i     EK  ; i)r  Fru  N)r  rx  r  r  r   r   r   r)   )rF   r  r  r  r   ry  s   &     r   test_disabled$HardlinkDedupTestsBase.test_disabled  s    *.//*;&DY	GG--//!--d3F#F+D$$5$1$$[a$q'%BC$$[a$q'%BC$$[a$q'%BC 0 HG +<// HGGs$   D
B*D
4D
DDD/c                T   \        V4      pV P                  \        V^ ,          V^,          4      V'       * 4       T P                  \        V^ ,          V^,          4      V'       * ;'       d    V'       * 4       V P                  \        V^,          V^,          4      V'       * 4       R# )r   N)r   r~   r)   )rF   r   r  r  ry  s   &&&& r   check_hardlinks&HardlinkDedupTestsBase.check_hardlinks  s    T!Wd1g6&	(T!Wd1g6&88y=	:T!Wd1g6&	(r   c           
     v   V P                  4        F}  w  rpV P                  W#R 7      ;_uu_ 4        V P                  4       ;_uu_ 4        V P                  V4      pV P	                  4        V P                  WBV4       RRR4       RRR4       K  	  R#   + '       g   i     L; i  + '       g   i     K  ; i)r  N)r  rx  r  r  r   r  )rF   r  r  r  r   s   &    r   rz  $HardlinkDedupTestsBase.test_hardlink"  s    *.//*;&DY	GG--//!--d3F$$&((IF 0 HG +<// HGGs#   B'
4B>B'B$B''B8c                   R F  pV P                  VR7      ;_uu_ 4        V P                  4       ;_uu_ 4        V P                  V P                  4       4      pV P	                  VR7       \        W!^ ,          4      p\        W!^,          4      pV P                  \        W44      4       RRR4       RRR4       K  	  R#   + '       g   i     L; i  + '       g   i     K  ; i)r   )optsr   N))r   r   )r   r   )r   r   )rx  r  r  r  r   r   rg   r)   )rF   r  r   pyc1pyc2s   &    r   test_only_two_levels+HardlinkDedupTestsBase.test_only_two_levels+  s    ,D4((--// "--d.>.>.@AF$$d$3"673D"673DOOK$;< 0 )( -// )((s#   CA0B?)C?C
CC#c                :   V P                  4       ;_uu_ 4        V P                  V P                  4       4      pV P                  . ROR7       \	        V^ 4      p\	        V^4      pV P                  \        W#4      4       RRR4       R#   + '       g   i     R# ; i)r   r  N)r   r   r   r   )r  r  r  r   r   rg   r)   )rF   r   r  r  s   &   r   test_duplicated_levels-HardlinkDedupTestsBase.test_duplicated_levels8  sw     %%'' %%d&6&6&89Fl361%D61%DOOK34 ('''s   A&B		B	c           
        V P                  4       ;_uu_ 4        V P                  R 4      pV P                  4        V P                  V4       \	        V4      p\
        P                  ! V^ ,          4      P                  pV P                  R4      pV P                  ^ ^.RR7       V P                  V\
        P                  ! V^,          4      P                  4       V P                  \        V^ ,          V^,          4      4       V P                  V\
        P                  ! V^,          4      P                  4       V P                  \        P                  ! V^,          V^,          RR7      4       RRR4       R#   + '       g   i     R# ; i)rM  print(0)T)r   rv   shallowN)r  r  r   r  r   r"   r#   r$   r~   rg   r)   r   r   filecmpcmprF   r   ry  inodes   &   r   test_recompilation)HardlinkDedupTestsBase.test_recompilationD  s    %%''%%g.F  (F#DGGDG$++E %%j1F q!fD9 UBGGDG$4$;$;<OOKQa9:rwwtAw'7'>'>?W[[a$q'4HI) ('''s   EE;;F	c           
     b   V P                  4       ;_uu_ 4        V P                  V P                  4       R R7      pV P                  4        V P	                  V4       \        V4      p\        P                  ! V^ ,          4      P                  pV P                  RR R7      p\        P                  ! RRRRV P                  R7       V P                  V\        P                  ! V^ ,          4      P                  4       V P                  V\        P                  ! V^,          4      P                  4       V P                  \        V^,          V^,          4      4       V P                  \        P                   ! V^,          V^,          RR	7      4       R
R
R
4       R
#   + '       g   i     R
# ; i)module)r~  r  r  z-czimport moduleF)r%  r  Tr  N)r  r  r  r   r  r   r"   r#   r$   r
   r  r9   r~   r   r)   r  r  r  s   &   r   test_import"HardlinkDedupTestsBase.test_import]  s:    %%''%%d&6&6&8x%HF  (F#DGGDG$++E %%jx%@F **dO$))
 UBGGDG$4$;$;<UBGGDG$4$;$;<[a$q':;W[[a$q'4HI- ('''s   E:FF.	r   N)r   r   )FF)rl  rm  rn  ro  rH   rc   r|  r  r  r   r  r  r  r  r  rz  r  r  r  r  rs  rt  ru  s   @r   r  r    s       @B4 B) B5 B< 3
D(G=
5J2J Jr   r  c                       ] tR tRtRtR# )!HardlinkDedupTestsWithSourceEpochiy  ry  Nrz  ry  r   r   r  r  y  r{  r   r  c                       ] tR tRtRtR# )HardlinkDedupTestsNoSourceEpochi  ry  Nrz  ry  r   r   r  r    r{  r   r  __main__)8rh   rc   r  importlib.utilr   re   r"   r|   r7   rU   r3  r3   test.test_importlib.utilr   r  rz   r   r   multiprocessing.utilr   r  concurrent.futuresr   concurrent.futures.processr   rp  NotImplementedErrorModuleNotFoundErrorr   test.supportr	   r
   test.test_py_compiler   r   test.support.os_helperr   r   r   r)   r+   TestCaserx  r  skipIfis_wasir  r  r  r  skip_unless_hardlinkr  r  r  rl  r`  ry  r   r   <module>r     s       	 	    
     %	" U6?   " & : 8 +F7g8 g8T	%8%-%6%6/F7;		(;(0(9(92I:?	 
"DE48$$ 4 F4:{K {K|	&:'/'8'81H9=		$8%-%6%6/F7<	 ZJ ZJ  ZJz	(>(0(9(92I:>		&<&.&7&70G8=	 zMMO ]# 	01 "!"s   F F-,F-