python (3.11.7)

(root)/
lib/
python3.11/
lib2to3/
tests/
__pycache__/
test_main.cpython-311.pyc

elJddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
ejej
edZejedZGddejZedkrej
dSdS)N)maindatazpy2_test_grammar.pyc>eZdZdZdZdZdZdZdZdZ	dZ
d	S)
TestMaincd|_dSN)temp_dirselfs K/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/lib2to3/tests/test_main.pysetUpzTestMain.setUps



crtjjdd=|jrt	j|jdSdSr)loggingroothandlersr	shutilrmtreer
s rtearDownzTestMain.tearDowns?L!!!!$=	)M$-(((((	)	)rcXtj}tj}tj}|t_|t_|t_	t	jd||t_|t_|t_S#|t_|t_|t_wxYw)Nz
lib2to3.fixes)sysstdinstdoutstderrr)rargs
in_captureout_captureerr_capture
save_stdinsave_stdoutsave_stderrs        rrun_2to3_capturezTestMain.run_2to3_captures{Y
jj	 
 
	%9_d33"CI$CJ$CJJ#CI$CJ$CJ$$$$s
B&B)ctjd}tj}tjd|}tj}|dg|||}||d|d}|	d||	d|dS)Nuprint 'nothing'
print u'über'
ascii-rz-print 'nothing'z9WARNING: couldn't encode <stdin>'s diff for your terminal)
ioStringIOBytesIOcodecs	getwriterr"assertEqualgetvaluedecodeassertIn)rinput_streamoutout_encerrretoutputs       rtest_unencodable_diffzTestMain.test_unencodable_diff,s{#FGGjll+&"7++C00kmm##SE<#FFa   &&w//

(&111

&'*||~~	7	7	7	7	7rc$tj|_tj|jd|_tj|jd|_tj|jtj|jg|_	ttj|jdd|j	dtjt|j|j	tjttj|jd|_tj|jd|_t|jd5}|ddddn#1swxYwY|j	ddS)z5Setup a test source tree and output destination tree.python2_projectpython3_projectz__init__.pywz
trivial.pyz#print 'I need a simple conversion.'N)tempfilemkdtempr	ospathjoinpy2_src_dirpy3_dest_dirmkdirsetup_filesopencloseappendrcopyPY2_TEST_MODULEbasenametrivial_py2_file
init_py2_filewrite)rtrivials  rsetup_test_source_treesz TestMain.setup_test_source_trees8s (**
7<<
7HIIGLL8IJJ
!"""
"###RW\\$*M
:
:C@@FFHHH
...OT%5666 0 0 A ABBB "T-=| L LW\\$*:MJJ
$'
-
-	AMM?@@@	A	A	A	A	A	A	A	A	A	A	A	A	A	A	A-----s	G++G/2G/c8|tj}tj}d|ddddd|j|jgtjd||}||d|}|d	||d
|jd|jd||tfd
|j
Dttj|j|j
D]g}|dtj
|j|dtj
|j|z|htjtj}||dd|||dd|dS)z92to3 a single directory with a new output dir and suffix.TEST-nz--add-suffix--write-unchanged-files
--no-diffs--output-dirrz implies -w.
Output in ! will mirror the input directory  layoutc3"K|]	}|zV
dSr).0namesuffixs  r	<genexpr>zGTestMain.test_filename_changing_on_output_single_dir.<locals>.<genexpr>\s'FFTT&[FFFFFFrzWriting converted z to zNo changes to .*/__init__\.py/zNo changes to .*/trivial\.pyN)rMr&r'r"r@r?r+r,r.setrBr<listdirr=r>reescapesepassertRegexreplaceassertNotRegex)rr0r2r3rr[rcr\s       @r+test_filename_changing_on_output_single_dirz4TestMain.test_filename_changing_on_output_single_dirKs4$$&&&kmmkmm##~v/H~"D$46Bc	++
	
a   

nf---


)))4+;+;+;=>D	F	F	F	
FFFFT5EFFFFFRZ(9::;;	=	=	=$	K	KDMMMGLL!148888GLL!2DK@@@BCI
K
K
K
Ki8@@cJJ	L	L	L7??SII	K	K	K	K	KrcJ|tj}|j|jg}td|D}|ddddd|jg|ztjdtj|}||d|	}|
d	|jd
|jd|||ttj
|jdS)
z62to3 two files in one directory with a new output dir.c3TK|]#}tj|V$dSr)r<r=rH)rZr[s  rr]zFTestMain.test_filename_changing_on_output_two_files.<locals>.<genexpr>ms2JJRW--d33JJJJJJrrP-wrQrRrSrTrrUrVrWN)rMr&r'rIrJr_r"r@r+r,r.r?r<r`)rr2	py2_filesexpected_filesr3rs      r*test_filename_changing_on_output_two_filesz3TestMain.test_filename_changing_on_output_two_fileshs($$&&&kmm*D,>?	JJ	JJJJJ##t6~t/@BDMNB55	
a   


)))4+;+;+;=>D	F	F	F	
RZ8I-J-J)K)KLLLLLrc`|tj}|dddd|j|jgtjdtj|}||d|}|d|jd|j	d	||ttj
|jgttj|jd
S)z)2to3 a single file with a new output dir.rPrjrRrSrTrrUrVrWN)rMr&r'r"r@rIr+r,r.r?r_r<r=rHr`)rr2r3rs    r,test_filename_changing_on_output_single_filez5TestMain.test_filename_changing_on_output_single_fileys$$&&&kmm##t\>4;L&(B55	
a   


)))4+;+;+;=>D	F	F	F	
bg..t/DEEFGGRZ(9::;;	=	=	=	=	=rN)__name__
__module____qualname__r
rr"r5rMrgrmrorYrrrrs)))%%%
7
7
7...&KKK:MMM"=====rr__main__)r)r&rr<rarrr:unittestlib2to3rr=r>dirname__file__
TEST_DATA_DIRrGTestCaserrprYrr<module>rzs



												







RW__X66??
',,}.CDDt=t=t=t=t=x t=t=t=nzHMOOOOOr