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
Z\¬Qc@sÜddlZddlZddlZddlZddlZgZdefd„ƒYZd„ZiZ    dd„Z d„Z dd„Z d„Zd    „Zd
ejfd „ƒYZd „Zd „Zddd„ƒYZdS(iÿÿÿÿNtResourceDeniedcBseZdZRS(sÂTest skipped because it requested a disallowed resource.
 
    This is raised when a test calls requires() for a resource that
    has not be enabled.  Resources are defined by test modules.
    (t__name__t
__module__t__doc__(((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/ctypes/test/__init__.pyRscCs`tjƒjjjdƒdkr%tStdk    oF|tkpFdtk}|s\dt|<n|S(skTest whether a resource is enabled.
 
    If the caller's module is __main__ then automatically return True.Rt__main__t*N(    tsyst    _getframetf_backt    f_globalstgettTruet use_resourcestNonet_unavail(tresourcetresult((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/ctypes/test/__init__.pytis_resource_enabled s!  cCs]tjƒjjjdƒdkr%dSt|ƒsY|dkrJd|}nt|ƒ‚ndS(sˆRaise ResourceDenied if the specified resource is not available.
 
    If the caller's module is __main__ then automatically return True.RRNs$Use of the `%s' resource not enabled(RRRR    R
RR R(Rtmsg((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/ctypes/test/__init__.pytrequiress !   ccsddl}t|dƒr¹t|jdƒr¹|jjdtjjƒ}tjj||ƒ}x·|jj    j
ƒD]B}|j ||ƒrptjj |ƒdjtjjdƒVqpqpWn^|j d}xNtj|ƒD]=}|j ||ƒrÖd|jtjj |ƒdfVqÖqÖWdS(Niÿÿÿÿt
__loader__t_filest.is%s.%s(tfnmatchthasattrRRtreplacetostpathtseptjoinRtiterkeyst fnmatchcasetsplitextt__path__tlistdir(tpackagetmaskRRtfnm((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/ctypes/test/__init__.pytfind_package_modules&s 1 c Cskg}g}xRt||ƒD]A}|jdƒd|krn|j|ƒ|dkrtjd|IJqqny"t|tƒtƒdgƒ}WnRtt    j
fk
rä}|j|ƒ|dkrtjd||fIJqqnXxut |ƒD]g}    |    j dƒr qònt ||    ƒ}
t|
ƒtt    jƒkròt|
t    jƒrò|j|
ƒqòqòWqW||fS(s@Return a list of skipped test modules, and a list of test cases.RiÿÿÿÿisSkipped %s: excludedRsSkipped %s: %st_(R&tsplittappendRtstderrt
__import__tglobalstlocalsRtunittesttSkipTesttdirt
startswithtgetattrttypetTestCaset
issubclass( R#R$t    verbositytexcludetteststskippedtmodnametmodtdetailtnameto((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/ctypes/test/__init__.pyt    get_tests5s,  "  -cCs    tGHdS(Ni(R(((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/ctypes/test/__init__.pytusageNsc    s9ddl‰ddl‰ˆjjƒ‰ˆjjƒ‰ˆjjƒ‰‡‡‡‡‡fd†}tj|ƒ}x4tdƒD]&}t    j
ƒ}|j |ƒ|ƒq|Wd}dg|}xHt|ƒD]:}t    j
ƒ}|j |ƒ|ƒt    j
ƒ|||<qÆWt d|ƒr#d|G|GHn|r5d|GHndS(s6Run testcase several times, tracking reference counts.iÿÿÿÿNcs;ˆjƒˆ_ˆjƒˆ_ˆjƒˆ_ˆjƒdS(N(tcopyt_pointer_type_cachet_c_functype_cachet_win_functype_cachetcollect((tcfctctypestgctptctwfc(s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/ctypes/test/__init__.pytcleanup\sis %s leaks:
   s%s: ok.(RHRGRBRARCRDR.t    makeSuitetrangeRtgettotalrefcounttrunR tfilter(    trunnerR6ttestcaseRKttesttitrctCOUNTt    refcounts((RFRGRHRIRJs\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/ctypes/test/__init__.pyttest_with_refcountsRs,        t
TestRunnercBseZd„ZRS(c Csà|jƒ}tjƒ}||ƒtjƒ}||}|jƒ|jj|jƒ|j}trítjƒ}|j    ƒ|jjd||dkr›dpžd|t
|ƒt
|ƒdkrÂdpÅdfƒ|jjddj |ƒƒn/|jjd||dkrdpd|fƒ|jjƒ|j ƒsÌ|jj dƒtt
|j|jfƒ\}    }
|    rƒ|jj d    |    ƒn|
r¹|    r¢|jj dƒn|jj d
|
ƒn|jjd ƒn|jjd ƒ|S( s&Run the given test case or test suite.s,Ran %d test%s in %.3fs (%s module%s skipped)itstsUnavailable resources: %ss, sRan %d test%s in %.3fssFAILED (s failures=%ds    errors=%dt)tOK(t _makeResultttimet printErrorststreamtwritelnt
separator2ttestsRunRtkeystsorttlenRt wasSuccessfultwritetmaptfailuresterrors( tselfRSR9Rt    startTimetstopTimet    timeTakenROt    requestedtfailedterrored((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/ctypes/test/__init__.pyROts>  
 
 
     
     #  #  !(RRRO(((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/ctypes/test/__init__.pyRYssc
Gsiy#tjtjddƒ\}}Wntjk
r=tƒSXd}t}g}xÒ|D]Ê\}}|dkr||d8}qW|dkr•|d7}qW|dkr×y tjWntk
rÍtjdIJdSXt    }qW|dkrüt
j |j d    ƒƒqW|d
krW|j |j d    ƒƒqWqWWd }|r>|d }nx$|D]}    t |    ||||ƒqEWdS( Nisrqvu:x:s-qs-vs-rs#-r flag requires Python debug buildiÿÿÿÿs-ut,s-xs    test_*.pyi(tgetoptRtargvterrorR@tFalseRNtAttributeErrorR*R R textendR(t    run_tests(
tpackagestoptstargsR6t search_leaksR7tflagtvalueR$R#((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/ctypes/test/__init__.pytmainšs8#                c Cs­t||||ƒ\}}td|ƒ}g|D]}tj|ƒ^q1}    tj|    ƒ}
|j|
|ƒ} |r tƒ}x!|D]} t||| ƒqƒWnt| j    ƒS(NR6(
R?RYR.RLt    TestSuiteROtBasicTestRunnerRXtboolRl( R#R$R6RR7R9t    testcasesRQR>tsuitestsuiteRtt((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/ctypes/test/__init__.pyR{¼s"     R„cBseZd„ZRS(cCstjƒ}||ƒ|S(N(R.t
TestResult(RmRSR((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/ctypes/test/__init__.pyROÍs 
(RRRO(((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/ctypes/test/__init__.pyR„Ìs(((RRR.RuR_R t    ExceptionRRRR RR&R?R@RXtTextTestRunnerRYR‚R{R„(((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/ctypes/test/__init__.pyt<module>s<                  !'    "