tzh
2024-08-22 c7d0944258c7d0943aa7b2211498fd612971ce27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
Q\¬Qc@sddlZddlZddlZddlZddlmZmZddlZddlZddl    m
Z dgZ ej r™e jdddgƒnge D]Zeef^q Zd„Zd    ejfd
„ƒYZd ejfd „ƒ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(sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pep352.pytwrappers((RR    ((RsX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pep352.pytignore_deprecation_warningsstExceptionClassTestscBsteZdZd„Zed„ƒZd„ZdZd „Zed „ƒZ    ed „ƒZ
ed„ƒZ d„Z RS(s]Tests for anything relating to exception objects themselves (e.g.,
    inheritance hierarchy)cCs|jtttƒƒdS(N(t
assertTruet
issubclasst    Exceptiontobject(tself((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/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(sargssmessages__str__s__repr__s __getitem__(R thasattrt    __class__t__name__(Rtinstattr((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pep352.pytverify_instance_interface$s cCsÊtd„ttƒDƒƒ}ttjjtjjtƒddƒƒ}zT|j    ƒj
ƒ}yt t |ƒ}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 }    nyt t |    ƒ} 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((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/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    TypeErrortcloset assertEqualtlen(Rtexc_settinheritance_treetsuperclass_nametlast_exct superclassest
last_depthtexc_linetdepthtexc_namet paren_indext platform_namet left_brackettexc((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/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((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/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((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/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((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pep352.pyttest_interface_multi_argss !"cCstƒ}t|jƒdg|jtƒg|jdgt|ƒdgt|ƒdgt|ƒ|jj    dgt
t
gf}|j |ƒdS(NiRZus()( RR<RR[RRLRMRNRRRRV(RRIRR((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pep352.pyttest_interface_no_arg€s     ! (cCs'tdtfƒtƒjWdQXdS(NRZ(RtDeprecationWarningt BaseExceptionR(R((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pep352.pyttest_message_deprecation‹s(RKsargssmessagesstrsunicodesreprRO( Rt
__module__t__doc__RR
RRJRQRVRYR^R_Rb(((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pep352.pyR s        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_((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pep352.pyt raise_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((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pep352.pyt catch_failss&
 
      cCs|ddd„ƒY}y
|‚Wn$|k
r0n|jdƒnXy |ƒ‚Wn$|k
rdn|jdƒnXdS(Nt ClassicClasscBseZRS((RRc(((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pep352.pyRk·ssunable to raise classic classs&unable to raise classic class instance((R1(RRk((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pep352.pyttest_raise_classic´s
   cCs7dtfd„ƒY}|j|ƒ|j|ƒƒdS(Nt NewStyleClasscBseZRS((RRc(((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pep352.pyRmËs(RRh(RRm((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pep352.pyt"test_raise_new_style_non_exceptionÆs cCs|jdƒdS(NRW(Rh(R((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/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((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pep352.pyttest_catch_stringÔs 
 
 
 
(
RRcRdRhRjR
RlRnRoRx(((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pep352.pyRe‘s            
   cCstttƒdS(N(RR Re(((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pep352.pyt    test_mainést__main__(tunittestR/R%Rqttest.test_supportRRR'tsystplatformRR6tDEPRECATION_WARNINGSt py3kwarningtextendtmsgR`RR
tTestCaseR ReRyR(((sX/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pep352.pyt<module>s(                   uX