%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/lib/python2.7/test/
Upload File :
Create Path :
Current File : //usr/local/lib/python2.7/test/test_compiler.pyo


Nac@sKddlZejjddeZddlmZddlZddl	Z	ddl
Z
ddlZddlmZddl
m
Z
dZd	efd
YZdejfdYZejjejjejjfZd
ddYZd\ZZd\ZZgeededdD]\ZZ ee f^q$Z!e!de!dd!idd6ZiZdeededdDZdedDZ"dhZ"d Z#d!Z#gZ!ddgZ!e!rn
eeZZy	e$GHWn
dZ$nXe$d7Z$zee7ZWddZXddl%TdZ&e'dkrGe&ndS("iNtcompilert
deprecated(tflatten(trandom(tStringIOii<tTrivialContextcBseZdZdZRS(cCs|S(N((tself((s./usr/local/lib/python2.7/test/test_compiler.pyt	__enter__scGsdS(N((Rtexc_info((s./usr/local/lib/python2.7/test/test_compiler.pyt__exit__s(t__name__t
__module__RR	(((s./usr/local/lib/python2.7/test/test_compiler.pyRs	tCompilerTestcBseZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZdZdZRS(cCstjt}tjjtj}tjj}xz|gD]o}xfdD]^}|tjkrtjt}t	j
dIJt	j
jn|jdsqHnt
rtdkrqHntjj||}tjjrdG|GHnt|d}|j}|jd|ks(d|krG|jttj||d	qHytj||d	WqHtk
r}	t|	j}
|
jd
|t|
|	_qHXqHWq;WdS(Ns
test_os.pys1  testCompileLibrary still working, be patient...s.pyg\(\?t	compilingtUt	badsyntaxt
bad_codingtexecsin file %s](s
test_os.py(ttimet_PRINT_WORKING_MSG_INTERVALtostpathtdirnamet__file__ttestttest_supportt
TEST_HOME_DIRtsyst
__stdout__tflushtendswithtTEST_ALLRtjointverbosetopentreadtclosetassertRaisestSyntaxErrorRtcompilet	Exceptiontlisttargstappendttuple(Rt	next_timetlibdirttestdirtdirtbasenameRtftbufteR*((s./usr/local/lib/python2.7/test/test_compiler.pyttestCompileLibrarys<

cCstjddddS(Nsclass foo():pass

s<string>R(RR'(R((s./usr/local/lib/python2.7/test/test_compiler.pyttestNewClassSyntax?scCstjddddS(Nsdef g(): yield

s<string>R(RR'(R((s./usr/local/lib/python2.7/test/test_compiler.pyt
testYieldExprBscscfd}ejddd}|i|d6UjeejdjeejddS(Ncs.j||fdidd6dd6fdS(Niiitxity(ii(tassertEqual(R*tkwargs(R(s./usr/local/lib/python2.7/test/test_compiler.pyR2Fssf(x=1, *(2, 3), y=4)s<string>RR2sfoo(a=1, b)sfoo(1, *args, 3)(RR'R%R&tparse(RR2tc((Rs./usr/local/lib/python2.7/test/test_compiler.pyttestKeywordAfterStarargsEs
cBsYejddd}i}||U|j|jdd|j|jdddS(Ns)try:
 1//0
except:
 e = 1
finally:
 f = 1s<string>RR4iR2(RR'R:tget(RR=tdct((s./usr/local/lib/python2.7/test/test_compiler.pyttestTryExceptFinallyNs	cCs|jttjddS(Nsdef foo(a=1, b): pass(R%R&RR<(R((s./usr/local/lib/python2.7/test/test_compiler.pyttestDefaultArgsWscBsfejddd}|jd|jejddd}i}||U|j|djddS(Ns"doc"s<string>Rt__doc__sdef f():
 "doc"R2tdoc(RR'tassertIntco_namesR:RC(RR=tg((s./usr/local/lib/python2.7/test/test_compiler.pyttestDocstringsZscCsBt}|jdr"|d }ntj|}|j|dS(Ns.pycs.pyoi(s.pycs.pyo(RRRt	parseFiletcheck_lineno(Rtfilenamettree((s./usr/local/lib/python2.7/test/test_compiler.pyt
testLineNobs

cCs;y|j|Wn#tk
r6|jG|jGHnXdS(N(t
_check_linenotAssertionErrort	__class__tlineno(Rtnode((s./usr/local/lib/python2.7/test/test_compiler.pyRJjs

cCs|jtkra|j|jtd|j|jf|j|jdkd|j|jfnx!|jD]}|j|qnWdS(Nslineno=%s on %si(RPtNOLINENOtassertIsInstanceRQtintt
assertTruet
getChildNodesRJ(RRRtchild((s./usr/local/lib/python2.7/test/test_compiler.pyRNqscCsK|jtddggddg|jtddfddgdS(Nii(i(R:R(R((s./usr/local/lib/python2.7/test/test_compiler.pyttestFlattenzs%cBs@ejddd}i}||U|j|jdddS(NsHdef g():
    a = 1
    def f(): return a + 2
    return f()
result = g()s<string>Rtresulti(RR'R:R?(RR=R@((s./usr/local/lib/python2.7/test/test_compiler.pyttestNestedScope~s		cCs8tjddd}|jt|dd	d
gdS(NsKlist((i,j) for i in range(3) if i < 3           for j in range(4) if j > 2)s<string>tevaliiii(ii(ii(ii(RR'R:R\(RR=((s./usr/local/lib/python2.7/test/test_compiler.pyt
testGenExps		cCsltjddd}|jt|dddhtjddd}|jt|dddhdS(Ns	{1, 2, 3}s<string>R\iiis
{1, 2, 3,}(RR'R:R\(RR=((s./usr/local/lib/python2.7/test/test_compiler.pyttestSetLiteralscCstjddd}|jt|idd6dd6dd6tjddd}|jt|idd6dd6dd6dS(	Ns{1:2, 2:3, 3:4}s<string>R\iiiis{1:2, 2:3, 3:4,}(RR'R:R\(RR=((s./usr/local/lib/python2.7/test/test_compiler.pyttestDictLiterals+cCsrtjddd}|jt|dddhtjddd}|jt|ddddd	hdS(
Ns{x for x in range(1, 4)}s<string>R\iiisE{x * y for x in range(3) if x != 0       for y in range(4) if y != 0}ii(RR'R:R\(RR=((s./usr/local/lib/python2.7/test/test_compiler.pyttestSetComps		cCs}tjddd}|jt|idd6dd6dd6tjddd}|jt|idd	6dd
6dS(Ns{x:x+1 for x in range(1, 4)}s<string>R\iiiisO{(x, y) : y for x in range(2) if x != 0            for y in range(3) if y != 0}(ii(ii(RR'R:R\(RR=((s./usr/local/lib/python2.7/test/test_compiler.pyttestDictComps+		cBsGejddd}ied6}||U|j|jdddS(Nsgfrom __future__ import with_statement
def f():
    with TrivialContext():
        return 1
result = f()s<string>RRRZi(RR'RR:R?(RR=R@((s./usr/local/lib/python2.7/test/test_compiler.pyttestWiths		
cBsGejddd}ied6}||U|j|jdddS(Nsmfrom __future__ import with_statement
def f():
    with TrivialContext() as tc:
        return 1
result = f()s<string>RRRZi(RR'RR:R?(RR=R@((s./usr/local/lib/python2.7/test/test_compiler.pyttestWithAsss		
cs|gdd	fdY}ejddd}i|d6}||U|j|jdd|jddgdS(
NtCtxcs)eZdZfdZdZRS(cSs
||_dS(N(tn(RRe((s./usr/local/lib/python2.7/test/test_compiler.pyt__init__scsj|jdS(N(R+Re(R(tevents(s./usr/local/lib/python2.7/test/test_compiler.pyRscWsdS(N((RR*((s./usr/local/lib/python2.7/test/test_compiler.pyR	s(R
RRfRR	((Rg(s./usr/local/lib/python2.7/test/test_compiler.pyRds	srfrom __future__ import with_statement
def f():
    with Ctx(1) as tc, Ctx(2) as tc2:
        return 1
result = f()s<string>RRZii((RR'R:R?(RRdR=R@((Rgs./usr/local/lib/python2.7/test/test_compiler.pyttestWithMults		
cBsOejddd}iid6}i}|||U|j|jdddS(Nsglobal x
x=1s<string>Rt__builtins__R8i(RR'R:R?(Rtcodetd1td2((s./usr/local/lib/python2.7/test/test_compiler.pyt
testGlobals


cBsKejddd}ied6}||U|j|djddS(NsVfrom __future__ import print_function
print("a", "b", sep="**", end="++", file=output)s<string>Rtoutputsa**b++(RR'RR:tgetvalue(RR=R@((s./usr/local/lib/python2.7/test/test_compiler.pyttestPrintFunctions		cCsTyt|ddWn9tk
rO}|j|j||j|j|nXdS(NtR(R'R&R:toffsetttext(RtsrcRsRrR4((s./usr/local/lib/python2.7/test/test_compiler.pyt_testErrEncs
cCsjd}d}d}|j||d|j|||d|j|||d|j||ddS(Nsprint 'pC\', '
sprint '12345678', '
s#! -*- coding: ShiftJIS -*-
i(Ru(Rtsjistasciitencdef((s./usr/local/lib/python2.7/test/test_compiler.pyttestSourceCodeEncodingsErrors(R
RR5R6R7R>RARBRHRMRJRNRYR[R]R^R_R`RaRbRcRhRmRpRuRy(((s./usr/local/lib/python2.7/test/test_compiler.pyRs0	,																						
				
	tTotocBseZdZRS(t	docstring(R
RRC(((s./usr/local/lib/python2.7/test/test_compiler.pyRzsiiii
iitacCsi|]\}}||qS(((t.0R8R9((s./usr/local/lib/python2.7/test/test_compiler.pys
<dictcomp>s	cCsh|]}|qS(((R}R8((s./usr/local/lib/python2.7/test/test_compiler.pys	<setcomp>s	i(t*cCs&tjjdatjjtdS(Ntcpu(RRtis_resource_enabledRtrun_unittestR(((s./usr/local/lib/python2.7/test/test_compiler.pyt	test_main7st__main__i,((ii(ii((ii((ttest.test_supportRRt
import_moduletTrueRtcompiler.astRRRRtunittestRRRtobjectRtTestCaseRtasttModuletStmttDiscardRSRzR|tbR=tdtziptrangeR8R9tltstttyotmathRR
(((s./usr/local/lib/python2.7/test/test_compiler.pyt<module>sN0!=
(	
	


	

Zerion Mini Shell 1.0