python (3.11.7)

(root)/
lib/
python3.11/
test/
__pycache__/
test_tabnanny.cpython-311.opt-2.pyc

e5@	ddlmZmZddlZddlZddlZddlZddlZddlZddl	m
Z
mZmZm
Z
ddlmZddddd	d
dZGdd
ZGddeZGddeZGddeZGddeZGddeZGddeZdS))TestCasemockN)captured_stderrcaptured_stdout
script_helperfindfile)unlinkzCfruits = [
    "Apple",
    "Orange",
    "Banana",

print(fruits)
zLif True:
    print("hello")
  print("world")
else:
    print("else called")
zIif True:
 	print("hello")
	print("world")
else:
    print("else called")
zNif True:
    print("hello")
    print("world")
else:
    print("else called")
zGdef my_func():
	  print("hello world")
	  if True:
		print("If called")zLdef my_func():
		print("Hello world")
		if True:
	        print("If called"))incomplete_expressionwrong_indentednannynag_errored
error_freetab_space_errored_1tab_space_errored_2c$eZdZ	ddZdZdZdS)TemporaryPyFileNc"||_||_dSN)source_codedir)selfr	directorys   F/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/test/test_tabnanny.py__init__zTemporaryPyFile.__init__Bs&ctjd|jdd5}||jdddn#1swxYwY|j|_|jS)Nwz.pyF)modersuffixdelete)tempfileNamedTemporaryFilerwritername	file_path)rfs  r	__enter__zTemporaryPyFile.__enter__Fs

($(5


	&

GGD$%%%	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&~sAA	A	c.t|jdSr)r	r%)rexc_type	exc_value
exc_tracebacks    r__exit__zTemporaryPyFile.__exit__Nst~r)rN)__name__
__module____qualname__rr'r,rrrr?sI5rrceZdZ	dZdS)TestFormatWitnessesc	gd}|D]\\}}|||5|tj||dddn#1swxYwY]dS)N))Testzat tab sizes T, e, s, t)rzat tab size )tz
at tab size t)z  t  zat tab sizes  ,  , t,  ,  )wordsexpected)subTestassertEqualtabnannyformat_witnesses)rtestsr6r7s    rtest_format_witnessesz)TestFormatWitnesses.test_format_witnessesUsI


 %	M	MOE8EH==
M
M  !:5!A!A8LLL
M
M
M
M
M
M
M
M
M
M
M
M
M
M
M	M	Ms)AA	 A	N)r-r.r/r=r0rrr2r2Rs+0MMMMMrr2ceZdZ	dZdS)TestErrPrintcT	ddgdfdgdfgddfgdfg}|D]\}}|||5t5}tj|dddn#1swxYwY|||dddn#1swxYwYdS)	Nfirstsecondz
first second
zfirst
)z1 2 3

)	argumentsr7)r8rr:errprintr9getvalue)rr<argsr7stderrs     r
test_errprintzTestErrPrint.test_errprintfsNPx
 "23Y	"
YY	"
J	
$	?	?ND(x@@
?
?$&&-&%t,,---------------  !2!2X>>>
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?	?	?s5BABA!!B$A!%+BB 	#B 	N)r-r.r/rLr0rrr?r?cs&(
?
?
?
?
?rr?ceZdZdZdS)TestNannyNagc	tjdddddddftjdddddddfg}|D]5\}}|}|}|}|||d	5||d|dddn#1swxYwY|||d
5||d
|dddn#1swxYwY|||d
5||d|dddn#1swxYwY7dS)Nrfoobar)linenomsglinetestmsgtestlinerR)line_numberr7rS)rSr7rT)rTr7)r:NannyNag
get_linenoget_msgget_liner8r9)rr<nannyr7rXrSrTs       rtest_all_methodszTestNannyNag.test_all_methodswsaC!!UE22UE::

!!Y
;;Y
CC
	
 %	9	9OE8**,,K--//C>>##D'(82D
B
B  (!3[AAA
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B#@@
7
7  %#666
7
7
7
7
7
7
7
7
7
7
7
7
7
7
74(62BCC
9
9  &!14888
9
9
9
9
9
9
9
9
9
9
9
9
9
9
9	9	9s6CC	C	,DD	D	=E&&E*	-E*	N)r-r.r/r^r0rrrNrNvs#99999rrNcTeZdZ	dZddZdZdZdZdZdZ	d	Z
d
ZdZdZ
d
S)	TestCheckcv|ttdtjdt_dS)Nverboser)
addCleanupsetattrr:rb)rs rsetUpzTestCheck.setUps+9h6FGGGrrch	t5}t5}tj|dddn#1swxYwYdddn#1swxYwY||||||dSr)rrr:checkr9rI)rdir_or_fileouterrstdoutrKs      rverify_tabnanny_checkzTestCheck.verify_tabnanny_checks	

	(&/*;*;	(vN;'''	(	(	(	(	(	(	(	(	(	(	(	(	(	(	(	(	(	(	(	(	(	(	(	(	(	(	(	(	(	(**C000**C00000s3AAAA	AA	AAAc	ttd5}||ddddS#1swxYwYdSNr
rSOURCE_CODESrlrr%s  rtest_correct_filezTestCheck.test_correct_files;
\,7
8
8	2I&&y111	2	2	2	2	2	2	2	2	2	2	2	2	2	2	2	2	2	2?AAc
d	tj5}|dg}ttd|}ttd|}|5}|5}||fD]}||ddt
_t5}t5}	tj	|dddn#1swxYwYdddn#1swxYwY|
}|D]F}
||
5||
|dddn#1swxYwYG|
|	
ddddn#1swxYwYdddn#1swxYwYddddS#1swxYwYdS)Nz: listing directory
r
rz: Clean bill of health.
rC)rTr)r!TemporaryDirectoryrrpappendr:rbrrrgrIr8assertInr9)rtmp_dirlinesfile1file2
file1_path
file2_pathr%rkrKrTs           rtest_correct_directory_verbosez(TestCheck.test_correct_directory_verboses*	
(
*
*	8g888:E#L$>'RRRE#L$>'RRRE
8*e
8z",j!9LLILLI!J!J!JKKKK#$ $&&,&/2C2C,vN7+++,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,**!44D40044

dF333444444444444444  !2!2B777
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8		8	8	8	8	8	8	8	8	8	8	8	8	8	8	8	8	8	8sAF%F
:E6C	"C7C	CC	
CC	E6C
E6!C
"1E6D6*E66D::E6=D:>,E6*F
6E::F
=E:>F
F%
F	F%F	F%%F),F)c	tj5}ttd|5||dddn#1swxYwYddddS#1swxYwYdS)Nr
rur!rvrrprl)rrys  rtest_correct_directoryz TestCheck.test_correct_directorysO

(
*
*	4g l!;wOOO
4
4**7333
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4	4	4	4	4	4	4	4	4	4	4	4	4	4	4	4	4	4	4s4A,AA,A	A,A	A,,A03A0c	ttd5}d}|d|}|||ddddS#1swxYwYdS)NrIunindent does not match any outer indentation level (<tokenize>, line 3)
: Indentation Error: rjrorr%rjs   rtest_when_wrong_indentedz"TestCheck.test_when_wrong_indentedsP
\*:;
<
<	;	*C<<s<<C&&yc&:::		;	;	;	;	;	;	;	;	;	;	;	;	;	;	;	;	;	;!A

AAc	ttd5}d}|d|}|||ddddS#1swxYwYdS)Nr
z(('EOF in multi-line statement', (7, 0))
z: Token Error: rrors   rtest_when_tokenize_tokenerrorz'TestCheck.test_when_tokenize_tokenerrorsS
\*AB
C
C	;y=C6666C&&yc&:::	;	;	;	;	;	;	;	;	;	;	;	;	;	;	;	;	;	;rc	ttd5}|d}|dz
}|dz
}dt_|||ddddS#1swxYwYdS)Nrz': *** Line 3: trouble in tab city! ***
z%offending line: '\tprint("world")\n'
z$indent not equal e.g. at tab size 1
rCri)rrpr:rbrlrr%ris   r test_when_nannynag_error_verbosez*TestCheck.test_when_nannynag_error_verboses	\*<=
>
>	;)JJJC??C::C H&&yc&:::
	;	;	;	;	;	;	;	;	;	;	;	;	;	;	;	;	;	;s3AA #A c	ttd5}|d}|||ddddS#1swxYwYdS)Nrz 3 '\tprint("world")\n'
rrors   rtest_when_nannynag_errorz"TestCheck.test_when_nannynag_errorsQ
\*<=
>
>	;)===C&&yc&:::	;	;	;	;	;	;	;	;	;	;	;	;	;	;	;	;	;	;sAA

A
c	d}|dtjdtjtjd|d}|||dS)Nz
no_file.pyz: I/O Error: [Errno z] z: rFr)errnoENOENTosstrerrorrl)rpathrjs   rtest_when_no_filezTestCheck.test_when_no_filesqD99el99U\**99.2999""4S"11111rcx	tj5}ttd|}ttd|}|5}|5}d}|d|}|||dddn#1swxYwYdddn#1swxYwYddddS#1swxYwYdS)Nrrur
rrrr)rry
error_file	code_filee_filec_filerjs       rtest_errored_directoryz TestCheck.test_errored_directorysM

(
*
*	=g(-.'J(\*gI
=vy
=F6====**7*<<<	
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=sY;B/B!B4BBBBBB/B	B/B	B//B36B3N)rr)r-r.r/rerlrrrrrrrrrrr0rrr`r`s#1111222
8880444;;;;;;;;;;;;222
=
=
=
=
=rr`cHeZdZ	ejddZdZdS)TestProcessTokensztabnanny.NannyNagcF	ttd5}t|5}tjtj|jdddn#1swxYwY||j	ddddS#1swxYwYdSrn)
rrpopenr:process_tokenstokenizegenerate_tokensreadlineassertFalsecalled)rMockNannyNagr%r&s    rtest_with_correct_codez(TestProcessTokens.test_with_correct_codesK
\,7
8
8	2Ii
NA'(@(L(LMMM
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N\0111	2	2	2	2	2	2	2	2	2	2	2	2	2	2	2	2	2	2s4B,A$B$A(	(B+A(	,BBBc
	dD]}||5tt|5}t|5}t	j|j}|tj	5tj
|dddn#1swxYwYdddn#1swxYwYdddn#1swxYwYdddn#1swxYwYdS)N)rr)key)r8rrprrrrassertRaisesr:rYr)rrr%r&tokenss     rtest_with_errored_codes_samplesz1TestProcessTokens.test_with_errored_codes_samples
sLB	<	<C#&&
<
<$\#%677<9i<A!)!9!*!E!E!..x/@AA<<$3F;;;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<	<	<s|C&C9B8	B!B8	!B%%B8	(B%)B8	,C8B<
<C?B<
CC&CC&CC&&C*	-C*	N)r-r.r/rpatchrrr0rrrrsM.TZ#$$22%$2<<<<<rrcDeZdZ	dddddZdZdZdZdZd	Zd
Z	dS)TestCommandLinerF)rkrKpartialcr	tjddg|R\}}}tj|}tj|}|r||f||ffD]u\}}	|	}
|D]G}|||
5|||
dddn#1swxYwYHvdS||||||dS)Nz-mr:)stdoutput)rassert_python_okrfsdecode
splitlinesr8rxassertListEqual)rrkrKrrJ_rirjrr_output_stds            rvalidate_cmdzTestCommandLine.validate_cmd"sP#4T:MMMM3k#k#	H!'
}=
5
5V ++--NN,,55D$w??55

dG4445555555555555555
5
5
  !1!163D3D3F3FGGG  !1!163D3D3F3FGGGGGsB44B8;B8c	ttd5}|d}|dz
}|||ddddS#1swxYwYdS)NrrzHunindent does not match any outer indentation level (<tokenize>, line 3)rKrrpr)rr%rKs   rtest_with_errored_filez&TestCommandLine.test_with_errored_file3sF
\*:;
<
<	8	";;;F,
-Fi777		8	8	8	8	8	8	8	8	8	8	8	8	8	8	8	8	8	8s"AAAc	ttd5}||ddddS#1swxYwYdSrnrrqs  rtest_with_error_free_filez)TestCommandLine.test_with_error_free_file;sO
\,7
8
8	)Ii(((	)	)	)	)	)	)	)	)	)	)	)	)	)	)	)	)	)	)rsc^	td}d|d}||dS)Nztabnanny.pyzUsage: z [-v] file_or_directory ...r)rr)rrrKs   rtest_command_usagez"TestCommandLine.test_command_usage@s?3
&&<4<<<(((((rc	ttd5}|d}|d||ddddS#1swxYwYdS)NrrFz-q)rkr)rr%rks   rtest_quiet_flagzTestCommandLine.test_quiet_flagFs8
\*<=
>
>	>)!%%%FdIf===	>	>	>	>	>	>	>	>	>	>	>	>	>	>	>	>	>	>sAAAc	ttd5}tjd}|d||dddddS#1swxYwYdS)Nr$offending line: '\tprint("world")\n'z-vTrkrrrptextwrapdedentstriprrrrks   rtest_verbose_modez!TestCommandLine.test_verbose_modeLsJ
\*<=
>
>	G$_:egg

dDFFF		G	G	G	G	G	G	G	G	G	G	G	G	G	G	G	G	G	GAA))A-0A-c	ttd5}tjd}|d||dddddS#1swxYwYdS)Nrrz-vvTrrrs   rtest_double_verbose_modez(TestCommandLine.test_double_verbose_modeTsP
\*<=
>
>	H$_:egg

eT&$GGG		H	H	H	H	H	H	H	H	H	H	H	H	H	H	H	H	H	HrN)
r-r.r/rrrrrrrr0rrrrs5)+BHHHHH"888)))
)))>>>GGGHHHHHrr)unittestrrrrr:rr!rtest.supportrrrrtest.support.os_helperr	rprr2r?rNr`rrr0rr<module>rs
$#######				$$$$$$$$$$$$))))))
		%	%	%	!	'K**Z&MMMMM(MMM"?????8???&9999989996m=m=m=m=m=m=m=m=`<<<<<<<<<;H;H;H;H;Hh;H;H;H;H;Hr