python (3.11.7)

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

e&	ddlZddlZddlZddlZddlZddlmZddlm	Z	ej
ZedzZdZ
dZeje
ZdZejeZdZd	Zd
ZGddZGd
deZGddeZGddeejZGddeejZGddeejZGddeejZGddeejZ GddejZ!GddejZ"e#dkrej$dSdS) N)support)	os_helperz.missingz
!@$)(!@#_1z
linecache abcz3
" Docstring "

def function():
    return result

z%
def f():
    return 1 + 1

a = f()

z
def f():
    return 3ceZdZfdZxZS)TempFilec8ttjd5}|j|_||jdddn#1swxYwY|tj
|jdS)NF)delete)supersetUptempfileNamedTemporaryFilename	file_namewritefile_byte_string
addCleanuprunlink)selffp	__class__s  G/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/test/test_linecache.pyrzTempFile.setUp+s




(
6
6
6	,"WDNHHT*+++	,	,	,	,	,	,	,	,	,	,	,	,	,	,	,	
	($.99999s'A**A.1A.)__name__
__module____qualname__r
__classcell__rs@rrr)s8:::::::::rc*eZdZfdZdZdZxZS)GetLineTestsGoodDatacd|jd|_t	dS)Nrutf-8)join	file_listencoderr
r)rrs rrzGetLineTestsGoodData.setUp6s< " 7 7 > >w G G


rc0tj|j5}t|D]R\}}|ds|dz
}tj|j|dz}|||S	ddddS#1swxYwYdS)N
)tokenizeopenr	enumerateendswith	linecachegetlineassertEqual)rrindexlinecached_lines     rtest_getlinez!GetLineTestsGoodData.test_getline:s
]4>
*
*	4b(}}
4
4t}}T**!DLD'/	JJ  {3333
4	4	4	4	4	4	4	4	4	4	4	4	4	4	4	4	4	4	4sA#BBBcntj|j}|||jdSN)r,getlinesrr.r#rliness  r
test_getlinesz"GetLineTestsGoodData.test_getlinesCs2"4>22/////r)rrrrr2r8rrs@rrr3sV4440000000rrceZdZdZdZdS)GetLineTestsBadDatacb|tj|jdddS)Nr'r)r.r,r-rrs rr2z GetLineTestsBadData.test_getlineKs-*4>1==rBBBBBrc`|tj|jgdSr4)r.r,r5rr<s rr8z!GetLineTestsBadData.test_getlinesNs++DN;;R@@@@@rN)rrrr2r8rrr:r:Hs:CCCAAAAArr:ceZdZgZdS)	EmptyFileNrrrr#r>rrr@r@RsIIIrr@ceZdZdgZdS)SingleEmptyLiner&NrAr>rrrCrCVsIIIrrCceZdZgdZdS)GoodUnicode)uá
zb
zabcdef
uááááá
NrAr>rrrErEZs;;;IIIrrEceZdZdZdS)BadUnicode_NoDeclarations
abcNrrrrr>rrrGrG]s#rrGceZdZdZdS)BadUnicode_WithDeclarations# coding=utf-8
abcNrHr>rrrJrJ`s1rrJcPeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dS)
LineCacheTestsc.tj}||tdt||tdt|t|td||tdt||tdttD]}tj
t|dz}t|d5}t|D](\}}|||||dz)	dddn#1swxYwYtjd}||gdS)	Nig?r'.pyr!encodingza/b/c/__init__.py)r,r-r.FILENAMEEMPTYassertRaises	TypeErrorINVALID_NAMEMODULESospathr"MODULE_PATHr)r*r5)rr-entryfilenamefiler/r0emptys        rr2zLineCacheTests.test_getlinefs#	
51159992..666	
)Wh<<<	
**E222q115999	I	IEw||K77%?Hh111
IT#,T??IIKE4$$T778UQY+G+GHHHHI
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
"#677#####s9EE#	&E#	cb|tjtjt	tjdd5}|tdddn#1swxYwYtjtj}|	|gddS)Nwr!rP)r&z	def f():
z
    return 3
)
rrrTESTFNr)rSOURCE_3r,r5r.)rrr7s   rtest_no_ending_newlinez%LineCacheTests.test_no_ending_newlines	()*:;;;
)"C'
:
:
:	bHHX															"9#344 F F FGGGGGsA..A25A2cg}tD]T}tjt|dz}||t
j|dU||gd|D}|	|gt
j
d|D}|	|gdS)NrOr'c.g|]}|tjv|Sr>r,cache.0fns  r
<listcomp>z2LineCacheTests.test_clearcache.<locals>.<listcomp>s$IIIrr/H/H/H/H/Hrc.g|]}|tjv|Sr>rfrhs  rrkz2LineCacheTests.test_clearcache.<locals>.<listcomp>s$EEErrY_/D/D/D/D/Dr)rWrXrYr"rZappendr,r-assertNotEqualr.
clearcache)rcachedr[r\cached_emptys     rtest_clearcachezLineCacheTests.test_clearcaches	+	+Ew||K77%?HMM(###h****	
FB'''IIVIIIr***	EEVEEEr*****rc
Ftj}tjdz}|tj|t
|dd5}|tdddn#1swxYwY||dg}t
|d5}t|D]=\}}|
||||dz||>	dddn#1swxYwYt
|dd5}|tdddn#1swxYwYtj
dt|D](\}}|
||||dz)tj
|t
|d5}t|D]=\}}|
||||dz||>	ddddS#1swxYwYdS)NrOr`r!rPr'dummy)r,r-rrarrr)rSOURCE_1r*r.rmSOURCE_2
checkcache)rr-source_namesourcesource_listr/r0s       rtest_checkcachezLineCacheTests.test_checkcaches<#&.	(+666
+sW
5
5
5	#LL"""	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#Q
+
0
0
0	)F(00
)
)t  ww{EAI'F'FGGG""4((((
)	)	)	)	)	)	)	)	)	)	)	)	)	)	)	)
+sW
5
5
5	#LL"""	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#	W%%%%[11	D	DKE4T77;	#B#BCCCC	[)))
+
0
0
0	)F(00
)
)t  ww{EAI'F'FGGG""4((((
)	)	)	)	)	)	)	)	)	)	)	)	)	)	)	)	)	)	)sJA55A9<A9AC::C>C>D>>EE:AHHHctjt}tj|dtjtd||tjtdS)NF)r,r5rRror.	lazycacher6s  rtest_lazycache_no_globalsz(LineCacheTests.test_lazycache_no_globalssk"8,,	 3Hd C CDDD	 28 < <=====rctjtt}tj|dtjtt|dttjt||tjtdS)NTr')	r,r5NONEXISTENT_FILENAMEglobalsror.r}lenrgr6s  rtest_lazycache_smokez#LineCacheTests.test_lazycache_smokes"#7CC)%&:GIIFF	H	H	HC	0D EFFGGG	
	 23G H HIIIIIrcvtjtjtt	}tjtjttjtt	||tjtdSr4)r,ror5rrr}r.updatecacher6s  r*test_lazycache_provide_after_failed_lookupz9LineCacheTests.test_lazycache_provide_after_failed_lookups"#7CC/0000'))<<<	 56J K KLLLLLrctjtjtt	tjdSr4)r,ror}rrrwr<s rtest_lazycache_checkz#LineCacheTests.test_lazycache_checks>0'))<<<rctj|dtjdt	|dtjdt	dS)NFrz<foo>)r,ror.r}rr<s rtest_lazycache_bad_filenamez*LineCacheTests.test_lazycache_bad_filenamese	 3B		 B BCCC	 3GWYY G GHHHHHrc\tjtjtt	}|dtjtt	|dttjtdS)NF)	r,ror5rrr.r}rrgr6s  rtest_lazycache_already_cachedz,LineCacheTests.test_lazycache_already_cacheds"#7CC 4gii@@	B	B	B	
C	0D EFFGGGGGrcptjt}||d}t	jtd|5tjt}dddn#1swxYwY|||tjt	jtd|5tjt}dddn#1swxYwY||g|tjt|dS)Nctr4)MemoryError)argskwargss  rraise_memoryerrorz:LineCacheTests.test_memoryerror.<locals>.raise_memoryerrorsrr)r,r5rR
assertTruer	swap_attrr.ro)rr7rlines2lines3s     rtest_memoryerrorzLineCacheTests.test_memoryerrors"8,,			

y-9J
K
K	2	2'11F	2	2	2	2	2	2	2	2	2	2	2	2	2	2	2'''

y-9J
K
K	2	2'11F	2	2	2	2	2	2	2	2	2	2	2	2	2	2	2$$$+H55u=====s$
A33A7:A7C((C,/C,N)rrrr2rcrrr{r~rrrrrrr>rrrLrLds$$$2HHH+++")))B>>>JJJMMM
III
HHH
>
>
>
>
>rrLc0eZdZfdZdZdZdZxZS)LineCacheInvalidationTestsc>ttjtjdz|_tjdz|_tjdz|_|j|j|jfD]}|	tj
|t|dd5}|d|ddddn#1swxYwY|
|tjtj|||tjt#j|jt|jdd5}|d	ddddS#1swxYwYdS)
Nz.1z.2z.3r`r!rPzprint("I am z")zprint("was modified"))r
rr,rorradeleted_file
modified_fileunchanged_filerrr)rassertNotInrgr5assertInrXremove)rfnameryrs   rrz LineCacheInvalidationTests.setUps


%,t3&-4'.5'()+		2		2E
OOI,e444eS7333
7v5E555666
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
UIO444u%%%MM%1111
	$#$$$
$$cG
<
<
<	2LL0111	2	2	2	2	2	2	2	2	2	2	2	2	2	2	2	2	2	2s$9CC#	&C#	/FFFctj|j||jtj||jtj||jtjdSr4)r,rwrrrgrrrr<s r test_checkcache_for_deleted_filez;LineCacheInvalidationTests.test_checkcache_for_deleted_file	siT.///*IO<<<

d()/:::

d)9?;;;;;rctj|j||jtj||jtj||jtjdSr4)r,rwrrrrgrrr<s r!test_checkcache_for_modified_filez<LineCacheInvalidationTests.test_checkcache_for_modified_filesiT/000

d'999+Y_===

d)9?;;;;;rc
tj||jtj||jtj||jtjdSr4)r,rwrrrgrrrr<s r!test_checkcache_with_no_parameterz<LineCacheInvalidationTests.test_checkcache_with_no_parametersf*IO<<<+Y_===

d)9?;;;;;r)rrrrrrrrrs@rrrse22222,<<<<<<<<<<<<<rr__main__)%r,unittestos.pathrXrr(testrtest.supportr__file__rRrrVrSrYdirname	TEST_PATHsplitrWrZrurvrbrrr:TestCaser@rCrErGrJrLrrmainr>rr<module>rs&""""""*,
GOOH%%	



!
!gooh''
::::::::000008000*AAAAA(AAA$h&7*H,=<<<<<&(9<<<$$$$$2H4E$$$22222!4h6G222K>K>K>K>K>X&K>K>K>\'<'<'<'<'<!2'<'<'<TzHMOOOOOr