%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_pep352.pyo

ó
Nêáac@sddlZddlZddlZddlZddlmZmZddlZddlZddl	m
ZdgZej
r™ejdddgƒngeD]Zeef^q Zd„Zd	ejfd
„ƒYZdejfd„ƒYZd
„ZedkreƒndS(iÿÿÿÿN(trun_unittesttcheck_warnings(tsystems)BaseException.message has been deprecateds)exceptions must derive from BaseExceptionsEcatching classes that don't inherit from BaseException is not alloweds7__get(item|slice)__ not supported for exception classescs‡fd†}|S(s%Ignore the known DeprecationWarnings.cs*tdttŒˆ||ŽSWdQXdS(Ntquiet(RtTruet
_deprecations(targstkw(tfunc(s,/usr/local/lib/python2.7/test/test_pep352.pytwrappers((RR	((Rs,/usr/local/lib/python2.7/test/test_pep352.pytignore_deprecation_warningsstExceptionClassTestscBsteZdZd„Zed„ƒZd„ZdZd„Zed„ƒZ	ed
„ƒZ
ed„ƒZd„ZRS(s]Tests for anything relating to exception objects themselves (e.g.,
    inheritance hierarchy)cCs|jtttƒƒdS(N(t
assertTruet
issubclasst	Exceptiontobject(tself((s,/usr/local/lib/python2.7/test/test_pep352.pyttest_builtins_new_style!scCs>x7dD]/}|jt||ƒd|jj|fƒqWdS(NRtmessaget__str__t__repr__t__getitem__s%s missing %s attribute(RRRRR(Rthasattrt	__class__t__name__(Rtinstattr((s,/usr/local/lib/python2.7/test/test_pep352.pytverify_instance_interface$s
cCsÊtd„ttƒDƒƒ}ttjjtjjtƒddƒƒ}zT|j	ƒj
ƒ}ytt|ƒ}Wn"t
k
r“|jd|ƒnX|j||ƒ|j|ƒg}d}xÚ|D]Ò}|j
ƒ}|jdƒ}||d}	d|	krR|	jdƒ}
|	|
dd	!}|	|
d }	tƒ|krR|j|	ƒqÄqRnd
|	kr~|	jd
ƒ}|	|d }	nytt|	ƒ}
Wn"t
k
rµ|jd|	ƒnX||krØ|j||fƒn4||krx%|d	d|kr|jƒqçWn|jt|
|d	dƒd|
j|d	djfƒy|j|
ƒƒWntk
rlnX|j|	|ƒ|j|	ƒ|
}|}qÄWWd|jƒX|jt|ƒdd
|ƒdS(Ncss$|]}|jdƒs|VqdS(t_N(t
startswith(t.0tx((s,/usr/local/lib/python2.7/test/test_pep352.pys	<genexpr>-sisexception_hierarchy.txtsbase class %s not a built-int-it(iiÿÿÿÿt[s%s not a built-in exceptions%s is not a subclass of %ss%s not accounted for(tsettdirt
exceptionstopentostpathtjointsplitt__file__treadlinetrstriptgetattrt__builtin__tAttributeErrortfailtassertIntdiscardtrindextindextplatform_systemtappendtpopRR
RRt	TypeErrortclosetassertEqualtlen(Rtexc_settinheritance_treetsuperclass_nametlast_exctsuperclassest
last_depthtexc_linetdepthtexc_nametparen_indext
platform_nametleft_brackettexc((s,/usr/local/lib/python2.7/test/test_pep352.pyttest_inheritance+sb



	
	

tlengthRRtstrtunicodetreprtindexingcCsMxFt|j|ƒD]2\}\}}|j||d|||fƒqWdS(Ns%s: %s != %s(tziptinterface_testsR;(Rtresultst	test_nametgiventexpected((s,/usr/local/lib/python2.7/test/test_pep352.pytinterface_test_drivercs%c	Cs°d}t|ƒ}t|jƒdg|jd|g|j|gt|ƒt|ƒgt|ƒt|ƒgt|ƒ|jjt|jƒg|d|gf}|j	|ƒdS(Ntspamii(
RR<RRRLRMRNRRRV(RtargRIRR((s,/usr/local/lib/python2.7/test/test_pep352.pyttest_interface_single_arghs.*"c	CsÂd}tt|ƒƒ}t|Œ}t|jƒ|g|j|g|jdgt|ƒt|ƒgt|ƒt|ƒgt|ƒ|j	j
t|jƒg|d|dgf}|j|ƒdS(Nitiÿÿÿÿ(ttupletrangeRR<RRRLRMRNRRRV(Rt	arg_countRRIRR((s,/usr/local/lib/python2.7/test/test_pep352.pyttest_interface_multi_argss!"cCstƒ}t|jƒdg|jtƒg|jdgt|ƒdgt|ƒdgt|ƒ|jj	dgt
t
gf}|j|ƒdS(NiRZus()(RR<RR[RRLRMRNRRRRV(RRIRR((s,/usr/local/lib/python2.7/test/test_pep352.pyttest_interface_no_arg€s	!(cCs'tdtfƒtƒjWdQXdS(NRZ(RtDeprecationWarningt
BaseExceptionR(R((s,/usr/local/lib/python2.7/test/test_pep352.pyttest_message_deprecation‹s(RKRRRLRMRNRO(
Rt
__module__t__doc__RR
RRJRQRVRYR^R_Rb(((s,/usr/local/lib/python2.7/test/test_pep352.pyRs		5	
t
UsageTestscBsJeZdZd„Zd„Zed„ƒZd„Zd„Zd„Z	RS(sTest usage of exceptionscCs:y
|‚Wntk
rdSX|jdt|ƒƒdS(s6Make sure that raising 'object_' triggers a TypeError.Ns!TypeError expected for raising %s(R9R1ttype(Rtobject_((s,/usr/local/lib/python2.7/test/test_pep352.pytraise_fails•s


cCsÂy"y
t‚Wn|k
r nXWn8tk
r5n(tk
r\|jdt|ƒƒnXy%y
t‚Wn|fk
r€nXWn9tk
r–dStk
r½|jdt|ƒƒnXdS(s,Catching 'object_' should raise a TypeError.s#TypeError expected when catching %sNs;TypeError expected when catching %s as specified in a tuple(t
StandardErrorR9R1Rf(RRg((s,/usr/local/lib/python2.7/test/test_pep352.pytcatch_failss&






	cCs|ddd„ƒY}y
|‚Wn$|k
r0n|jdƒnXy
|ƒ‚Wn$|k
rdn|jdƒnXdS(NtClassicClasscBseZRS((RRc(((s,/usr/local/lib/python2.7/test/test_pep352.pyRk·ssunable to raise classic classs&unable to raise classic class instance((R1(RRk((s,/usr/local/lib/python2.7/test/test_pep352.pyttest_raise_classic´s



cCs7dtfd„ƒY}|j|ƒ|j|ƒƒdS(Nt
NewStyleClasscBseZRS((RRc(((s,/usr/local/lib/python2.7/test/test_pep352.pyRmËs(RRh(RRm((s,/usr/local/lib/python2.7/test/test_pep352.pyt"test_raise_new_style_non_exceptionÆs
cCs|jdƒdS(NRW(Rh(R((s,/usr/local/lib/python2.7/test/test_pep352.pyttest_raise_stringÐscCs¢tjƒtjƒtjdƒd}|jtƒ#y
t‚Wn|k
rWnXWdQX|jtƒ)y
t‚Wnt|fk
r‘nXWdQXWdQXdS(NterrorRW(twarningstcatch_warningst
resetwarningstfilterwarningstassertRaisesR`RitAssertionError(Rtstr_exc((s,/usr/local/lib/python2.7/test/test_pep352.pyttest_catch_stringÔs






(
RRcRdRhRjR
RlRnRoRx(((s,/usr/local/lib/python2.7/test/test_pep352.pyRe‘s			
	cCstttƒdS(N(RRRe(((s,/usr/local/lib/python2.7/test/test_pep352.pyt	test_mainést__main__(tunittestR/R%Rqttest.test_supportRRR'tsystplatformRR6tDEPRECATION_WARNINGStpy3kwarningtextendtmsgR`RR
tTestCaseRReRyR(((s,/usr/local/lib/python2.7/test/test_pep352.pyt<module>s(		
	uX	

Zerion Mini Shell 1.0