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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
R\¬Qc7@s˜dZedkr!edƒ‚nddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlZddlZddlZyddlZWnek
r"dZnXddddd    d
d d d ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d2d3d9g7Zdefd:„ƒYZdefd;„ƒYZde jfd<„ƒYZejed=„ƒZe d>„Z!d?„Z"d@„Z#d¥d¦e dA„Z$dB„Z%dCZ&dZ'dDa(dDa)da*dE„Z+dF„Z,dG„Z-ej
j.dHƒrÖe dI„Z/dJ„Z0dK„Z1dL„Z2ne    j3Z0e    j4Z1e j5Z2dM„Z3dN„Z4dO„Z5dP„Z6dQ„Z7ddR„Z8dSZ9ej:ej;dT„Z<e9dU„Z=dVZ>dW„Z?d©Z@yeAeZBWneCk
re ZBnXej
j.dZƒZDe    jEdZkr¸d[ZFnÃe    jEd\krÐd]ZFn«d^ZFeBr{eGd_eAƒrôd`ZHneAd`daƒZHejIƒZJeKedbƒ s5ejLƒdcddkr>dZMq{eNdeƒZMyeMjOdfƒWnePk
rnq{XdgeMGHndhjQeFe    jRƒƒZFe    jSƒZTejdie dj„ƒZUeVddk„ZWdl„ZXdm„ZYdn„ZZddo„Z[dpe\fdq„ƒYZ]e dr„Z^ejds„ƒZ_ejdt„ƒZ`d$e\fdu„ƒYZad%ejbfdv„ƒYZcdwe\fdx„ƒYZdd(e\fdy„ƒYZeejdzdªd{„ƒZfejd|„ƒZgd}„Zhd~„Zid„Zjd€„ZkdZleKed‚ƒrþdelZlneldƒZmd„„Znd…„Zod«Zpd¬Zqdˆ„Zrd‰„Zsd­ZtdYetZuddeuZvdXeuZwejxZydŠ„Zzd‹etdŒ„Z{d‹eted„Z|dŽ„Z}d.d®d„ƒYZ~d„Zd‘„Z€d’„Zdd“„Z‚d”„Zƒd•„Z„d–„Z…d—„Z†e„d˜e ƒp"ej
d™kp"ej‡dšƒZˆe j‰eˆd›ƒZŠddœ„Z‹d„ZŒdž„ZdŸ„ZŽd „Zejd¡„ƒZd¢„Z‘d£„Z’d¤„Z“dS(¯s7Supporting definitions for the Python regression tests.stest.test_supports3test_support must be imported from the test packageiÿÿÿÿNtErrort
TestFailedtResourceDeniedt import_moduletverboset use_resourcest
max_memusetrecord_original_stdouttget_original_stdouttunloadtunlinktrmtreetforgettis_resource_enabledtrequirestfind_unused_portt    bind_porttfcmpt have_unicodet    is_jythontTESTFNtHOSTtFUZZtSAVEDCWDttemp_cwdtfindfiletsortdicttcheck_syntax_errortopen_urlresourcetcheck_warningstcheck_py3k_warningst CleanImporttEnvironmentVarGuardtcaptured_outputtcaptured_stdouttTransientResourcettransient_internettrun_with_localet set_memlimitt
bigmemtesttbigaddrspacetesttBasicTestRunnert run_unittestt run_doctesttthreading_setuptthreading_cleanupt reap_childrent cpython_onlytcheck_impl_detailt get_attributet
py3k_bytestimport_fresh_moduletstrip_python_stderrcBseZdZRS(s*Base class for regression test exceptions.(t__name__t
__module__t__doc__(((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR-scBseZdZRS(s Test failed.(R5R6R7(((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR0scBseZdZRS(sâTest skipped because it requested a disallowed resource.
 
    This is raised when a test calls requires() for a resource that
    has not been enabled.  It is used to distinguish between expected
    and unexpected skips.
    (R5R6R7(((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR3sccs=|r4tjƒtjddtƒdVWdQXndVdS(s™Context manager to suppress package and module deprecation
    warnings when importing them.
 
    If ignore is False, this context manager has no effect.tignores.+ (module|package)N(twarningstcatch_warningstfilterwarningstDeprecationWarning(R8((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyt_ignore_deprecated_imports;s   c    CsSt|ƒAytj|ƒSWn(tk
rH}tjt|ƒƒ‚nXWdQXdS(s¶Import and return the module to be tested, raising SkipTest if
    it is not available.
 
    If deprecated is True, any module or package deprecation messages
    will be suppressed.N(R=t    importlibRt ImportErrortunittesttSkipTesttstr(tnamet
deprecatedtmsg((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyRJs
 cCs|tjkr&t|ƒtj|=nxTttjƒD]C}||ks[|j|dƒr6tj|||<tj|=q6q6WdS(swHelper function to save and remove a module from sys.modules
 
       Raise ImportError if the module can't be imported.t.N(tsystmodulest
__import__tlistt
startswith(RCt orig_modulestmodname((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyt_save_and_remove_moduleWs
 cCsFt}ytj|||<Wntk
r4t}nXdtj|<|S(s€Helper function to save and block a module in sys.modules
 
       Return True if the module was in sys.modules, False otherwise.N(tTrueRGRHtKeyErrortFalsetNone(RCRLtsaved((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyt_save_and_block_moduleds 
 c Csüt|ƒêi}g}t||ƒzyax|D]}t||ƒq3Wx-|D]%}t||ƒsQ|j|ƒqQqQWtj|ƒ}Wntk
r£d}nXWdx'|jƒD]\}    }
|
t    j
|    <qµWx|D]} t    j
| =qÙWX|SWdQXdS(sImports and returns a module, deliberately bypassing the sys.modules cache
    and importing a fresh copy of the module. Once the import is complete,
    the sys.modules cache is restored to its original state.
 
    Modules named in fresh are also imported anew if needed by the import.
    If one of these modules can't be imported, None is returned.
 
    Importing of modules named in blocked is prevented while the fresh import
    takes place.
 
    If deprecated is True, any module or package deprecation messages
    will be suppressed.N( R=RNRTtappendR>RR?RRtitemsRGRH( RCtfreshtblockedRDRLtnames_to_removet
fresh_namet blocked_namet fresh_modulet    orig_nametmoduletname_to_remove((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR3qs&      cCsKyt||ƒ}Wn-tk
rBtjd|j|fƒ‚nX|SdS(s?Get an attribute, raising SkipTest if AttributeError is raised.smodule %s has no attribute %sN(tgetattrtAttributeErrorR@RAR5(tobjRCt    attribute((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR1—s      iicCs
|adS(N(t_original_stdout(tstdout((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR¬scCs tp tjS(N(RdRGRe(((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR°scCs&ytj|=Wntk
r!nXdS(N(RGRHRP(RC((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR    ³s twincCs¶||ƒ|r|}n$tjj|ƒ\}}|p:d}d}xR|dkr—tj|ƒ}|rm|n    ||ks}dStj|ƒ|d9}qFWtjd|tddƒdS(NRFgü©ñÒMbP?gð?is)tests may fail, delete still pending for t
stackleveli(    tostpathtsplittlistdirttimetsleepR9twarntRuntimeWarning(tfunctpathnametwaitalltdirnameRCttimeouttL((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyt_waitforºs
       cCsttj|ƒdS(N(RvRhR
(tfilename((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyt_unlinkÛscCsttj|ƒdS(N(RvRhtrmdir(Rs((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyt_rmdirÞscs6‡fd†‰tˆ|dtƒttj|ƒdS(Ncsuxntj|ƒD]]}tjj||ƒ}tjj|ƒr`tˆ|dtƒtj|ƒqtj|ƒqWdS(NRr(    RhRkRitjointisdirRvRORyR
(RiRCtfullname(t _rmtree_inner(sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR~âs Rr(RvRORhRy(Ri((R~sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyt_rmtreeáscCs&yt|ƒWntk
r!nXdS(N(RxtOSError(Rw((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR
ñs cCs@yt|ƒWn+tk
r;}|jtjkr<‚q<nXdS(N(RzR€terrnotENOENT(Rsterror((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyRy÷s
cCsIyt|ƒWn4tk
rD}|jtjtjfkrE‚qEnXdS(N(RR€RR‚tESRCH(Rite((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR ÿs
cCsjt|ƒxYtjD]N}ttjj||tjdƒƒttjj||tjdƒƒqWdS(sm"Forget" a module was ever imported by removing it from sys.modules and
    deleting any .pyc and .pyo files.tpyctpyoN(R    RGRiR
RhR{textsep(RMRs((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR s
$cCstdk    o|tkS(sPTest whether a resource is enabled.  Known resources are set by
    regrtest.py.N(RRR(tresource((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR scCs]tjdƒjjdƒ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.  The
    possibility of False being returned occurs when regrtest.py is executing.iR5t__main__Ns$Use of the `%s' resource not enabled(RGt    _getframet    f_globalstgetR RRR(R‰RE((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyRs !   t    localhostcCs/tj||ƒ}t|ƒ}|jƒ~|S(sî Returns an unused port that should be suitable for binding.  This is
    achieved by creating a temporary socket with the same family and type as
    the 'sock' parameter (default is AF_INET, SOCK_STREAM), and binding it to
    the specified host address (defaults to 0.0.0.0) with the port set to 0,
    eliciting an unused ephemeral port from the OS.  The temporary socket is
    then closed and deleted, and the ephemeral port is returned.
 
    Either this method or bind_port() should be used for any tests where a
    server socket needs to be bound to a particular port for the duration of
    the test.  Which one to use depends on whether the calling code is creating
    a python socket, or if an unused port needs to be provided in a constructor
    or passed to an external program (i.e. the -accept argument to openssl's
    s_server mode).  Always prefer bind_port() over find_unused_port() where
    possible.  Hard coded ports should *NEVER* be used.  As soon as a server
    socket is bound to a hard coded port, the ability to run multiple instances
    of the test simultaneously on the same host is compromised, which makes the
    test a ticking time bomb in a buildbot environment. On Unix buildbots, this
    may simply manifest as a failed test, which can be recovered from without
    intervention in most cases, but on Windows, the entire python process can
    completely and utterly wedge, requiring someone to log in to the buildbot
    and manually kill the affected process.
 
    (This is easy to reproduce on Windows, unfortunately, and can be traced to
    the SO_REUSEADDR socket option having different semantics on Windows versus
    Unix/Linux.  On Unix, you can't have two AF_INET SOCK_STREAM sockets bind,
    listen and then accept connections on identical host/ports.  An EADDRINUSE
    socket.error will be raised at some point (depending on the platform and
    the order bind and listen were called on each socket).
 
    However, on Windows, if SO_REUSEADDR is set on the sockets, no EADDRINUSE
    will ever be raised when attempting to bind two identical host/ports. When
    accept() is called on each socket, the second caller's process will steal
    the port from the first caller, leaving them both in an awkwardly wedged
    state where they'll no longer respond to any signals or graceful kills, and
    must be forcibly killed via OpenProcess()/TerminateProcess().
 
    The solution on Windows is to use the SO_EXCLUSIVEADDRUSE socket option
    instead of SO_REUSEADDR, which effectively affords the same semantics as
    SO_REUSEADDR on Unix.  Given the propensity of Unix developers in the Open
    Source world compared to Windows ones, this is a common mistake.  A quick
    look over OpenSSL's 0.9.8g source shows that they use SO_REUSEADDR when
    openssl.exe is called with the 's_server' option, for example. See
    http://bugs.python.org/issue2550 for more info.  The following site also
    has a very thorough description about the implications of both REUSEADDR
    and EXCLUSIVEADDRUSE on Windows:
    http://msdn2.microsoft.com/en-us/library/ms740621(VS.85).aspx)
 
    XXX: although this approach is a vast improvement on previous attempts to
    elicit unused ports, it rests heavily on the assumption that the ephemeral
    port returned to us by the OS won't immediately be dished back out to some
    other process when we close and delete our temporary socket but before our
    calling code has a chance to bind the returned port.  We can deal with this
    issue if/when we come across it.(tsocketRtclose(tfamilytsocktypettempsocktport((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR's
6 
cCs÷|jtjkrÐ|jtjkrÐttdƒrc|jtjtjƒdkrct    dƒ‚qcnttdƒr¢|jtjtj
ƒdkr¢t    dƒ‚q¢nttdƒrÐ|j tjtj dƒqÐn|j |dfƒ|jƒd}|S(s%Bind the socket to a free port and return the port number.  Relies on
    ephemeral ports in order to ensure we are using an unbound port.  This is
    important as many tests may be running simultaneously, especially in a
    buildbot environment.  This method raises an exception if the sock.family
    is AF_INET and sock.type is SOCK_STREAM, *and* the socket has SO_REUSEADDR
    or SO_REUSEPORT set on it.  Tests should *never* set these socket options
    for TCP/IP sockets.  The only case for setting these options is testing
    multicasting via multiple UDP sockets.
 
    Additionally, if the SO_EXCLUSIVEADDRUSE socket option is available (i.e.
    on Windows), it will be set on the socket.  This will prevent anyone else
    from bind()'ing to our host/port for the duration of the test.
    t SO_REUSEADDRisHtests should never set the SO_REUSEADDR socket option on TCP/IP sockets!t SO_REUSEPORTsHtests should never set the SO_REUSEPORT socket option on TCP/IP sockets!tSO_EXCLUSIVEADDRUSEi(R‘RtAF_INETttypet SOCK_STREAMthasattrt
getsockoptt
SOL_SOCKETR•RR–t
setsockoptR—tbindt getsockname(tsockthostR”((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyRcs$gíµ ÷ư>cCs#t|tƒst|tƒrcy8t|ƒt|ƒt}t||ƒ|krUdSWqqXn¬t|ƒt|ƒkrt|ttfƒrxPttt    |ƒt    |ƒƒƒD]-}t
||||ƒ}|dkr²|Sq²Wt    |ƒt    |ƒkt    |ƒt    |ƒkS||k||kS(Ni( t
isinstancetfloattabsRR™ttupleRJtrangetmintlenR(txtytfuzztitoutcome((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyRƒs-( ,iitjavas$testtriscosttestfiles@testts@test-àòslatin-1tgetwindowsversioniis'u"@test-\u5171\u6709\u3055\u308c\u308b"tLatin1sgWARNING: The filename %r CAN be encoded by the filesystem.  Unicode filename tests may not be effectives    {}_{}_tmpttempcwdccs
trct|tƒrcy|jtjƒp-dƒ}Wqctk
r_|s`tjdƒ‚q`qcXnt    j
ƒ}t }y$t    j |ƒt    j |ƒt}Wn7tk
rÒ|sµ‚ntjd|tddƒnXzt    j
ƒVWdt    j |ƒ|rt|ƒnXdS(sR
    Context manager that creates a temporary directory and set it as CWD.
 
    The new CWD is created in the current directory and it's named *name*.
    If *quiet* is False (default) and it's not possible to create or change
    the CWD, an error is raised.  If it's True, only a warning is raised
    and the original CWD is used.
    tasciis;unable to encode the cwd name with the filesystem encoding.s,tests may fail, unable to change the CWD to RgiN(RR£tunicodetencodeRGtgetfilesystemencodingtUnicodeEncodeErrorR@RARhtgetcwdRQtmkdirtchdirROR€R9RnRoR (RCtquiett    saved_dirt is_temporary((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyRÚs,
 
   cCsœtjj|ƒr|S|dk    r:tjj||ƒ}ntj}tjj|ƒg|}x9|D]1}tjj||ƒ}tjj|ƒrc|SqcW|S(sÕTry to find a file on sys.path and the working directory.  If it is not
    found the argument passed to the function is returned (this does not
    necessarily signal failure; could still be the legitimate path).N(RhRitisabsRRR{RGRstexists(tfiletheretsubdirRitdntfn((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyRþs      cCsJ|jƒ}|jƒg|D]}d|^q}dj|ƒ}d|S(s%Like repr(dict), but in sorted order.s%r: %rs, s{%s}(RVtsortR{(tdictRVtpairt    reprpairst
withcommas((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR s
 
cCs9ttdƒ}z|jƒSWd|jƒttƒXdS(s`
    Create an invalid file descriptor by opening and closing a file and return
    its fd.
    twbN(topenRtfilenoRR
(RÃ((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyt make_bad_fds
 
cCs|jtt|ddƒdS(Ns <test string>texec(t assertRaisest SyntaxErrortcompile(ttestcaset    statement((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR!sc
sbddl}ddl}|j|ƒdjdƒd}tjjtjjtƒd|ƒ}‡fd†}tjj|ƒr¦||ƒ}|dk    r™|St
|ƒnt dƒt ƒd|IJ|j |dd    ƒ}zNt|d
ƒ9}|jƒ}    x#|    r|j|    ƒ|jƒ}    qúWWdQXWd|jƒX||ƒ}|dk    rN|Std |ƒ‚dS( Niÿÿÿÿit/tdatacsGt|ƒ}ˆdkr|Sˆ|ƒr9|jdƒ|S|jƒdS(Ni(RÎRRtseekR(RÇtf(tcheck(sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pytcheck_valid_file,s    turlfetchs    fetching %s ...RtiRÍsinvalid resource "%s"(turlparseturllib2RjRhRiR{Rst__file__RÂRRR
RRturlopenRÎtreadtwriteRR(
turlRÛRÞRßRwRÇRÜRÚtoutts((RÛsY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR%s. $       
         tWarningsRecordercBs8eZdZd„Zd„Zed„ƒZd„ZRS(syConvenience wrapper for the warnings list returned on
       entry to the warnings.catch_warnings() context manager.
    cCs||_d|_dS(Ni(t    _warningst_last(tselft warnings_list((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyt__init__Ss    cCs\t|jƒ|jkr,t|jd|ƒS|tjjkrBdStd||fƒ‚dS(Niÿÿÿÿs%r has no attribute %r(    R©RèRéR`R9tWarningMessaget_WARNING_DETAILSRRRa(Rêtattr((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyt __getattr__Ws
cCs|j|jS(N(RèRé(Rê((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR9^scCst|jƒ|_dS(N(R©RèRé(Rê((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pytresetbs(R5R6R7RìRðtpropertyR9Rñ(((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyRçOs
        c csptjdƒ}|jjdƒ}|r4|jƒntjdtƒ&}tjdj    dƒt
|ƒVWdQXg|D]}|j ^qu}g}xŸ|D]—\}}    t }
x[|D]R} t | ƒ} tj|| tjƒr±t| j|    ƒr±t}
|j| ƒq±q±W|
r—| r—|j||    jfƒq—q—W|rOtd|dƒ‚n|rltd    |dƒ‚ndS(
s¶Catch the warnings, then check if all the expected
    warnings have been raised and re-raise unexpected warnings.
    If 'quiet' is True, only re-raise the unexpected warnings.
    it__warningregistry__trecordR9talwaysNsunhandled warning %ris)filter (%r, %s) did not catch any warning(RGR‹RŒRtclearR9R:RORHt simplefilterRçtmessageRQRBtretmatchtIt
issubclasst    __class__tremoveRUR5tAssertionError( tfiltersR¾tframetregistrytwtwarningtreraisetmissingREtcattseentexcRø((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyt_filterwarningsfs0  cOsI|jdƒ}|s<dtff}|dkr<t}q<nt||ƒS(s˜Context manager to silence warnings.
 
    Accept 2-tuples as positional arguments:
        ("message regexp", WarningCategory)
 
    Optional argument:
     - if 'quiet' is True, it does not fail if a filter catches nothing
        (default True without argument,
         default False if some filters are defined)
 
    Without argument, it defaults to:
        check_warnings(("", Warning), quiet=True)
    R¾R²N(RtWarningRRROR
(RtkwargsR¾((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyRs   cOs@tjr$|s*dtff}q*nd}t||jdƒƒS(sjContext manager to silence py3k warnings.
 
    Accept 2-tuples as positional arguments:
        ("message regexp", WarningCategory)
 
    Optional argument:
     - if 'quiet' is True, it does not fail if a filter catches nothing
        (default False)
 
    Without argument, it defaults to:
        check_py3k_warnings(("", DeprecationWarning), quiet=False)
    R²R¾((RGt py3kwarningR<R
R(RR ((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR¥s
    cBs)eZdZd„Zd„Zd„ZRS(s,Context manager to force import to return a new module reference.
 
    This is useful for testing module-level behaviours, such as
    the emission of a DeprecationWarning on import.
 
    Use like this:
 
        with CleanImport("foo"):
            importlib.import_module("foo") # new reference
    cGsotjjƒ|_xV|D]N}|tjkrtj|}|j|krZtj|j=ntj|=qqWdS(N(RGRHtcopytoriginal_modulesR5(Rêt module_namest module_nameR^((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyRìÈs  cCs|S(N((Rê((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyt    __enter__ÕscGstjj|jƒdS(N(RGRHtupdateR(Rêt
ignore_exc((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyt__exit__Øs(R5R6R7RìRR(((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR¼s
        cBs_eZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z    d„Z
d    „Z RS(
s_Class to help protect the environment variable properly.  Can be used as
    a context manager.cCstj|_i|_dS(N(Rhtenviront_environt_changed(Rê((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyRìás cCs |j|S(N(R(Rêtenvvar((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyt __getitem__åscCs<||jkr+|jj|ƒ|j|<n||j|<dS(N(RRR(RêRtvalue((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyt __setitem__èscCsK||jkr+|jj|ƒ|j|<n||jkrG|j|=ndS(N(RRR(RêR((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyt __delitem__îscCs |jjƒS(N(Rtkeys(Rê((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyRõscCs|||<dS(N((RêRR((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pytsetøscCs ||=dS(N((RêR((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pytunsetûscCs|S(N((Rê((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyRþscGshxU|jjƒD]D\}}|dkrG||jkrT|j|=qTq||j|<qW|jt_dS(N(RRVRRRRhR(RêRtktv((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyRs  ( R5R6R7RìRRRRRR RR(((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR Üs                                t DirsOnSysPathcBs)eZdZd„Zd„Zd„ZRS(sŽContext manager to temporarily add directories to sys.path.
 
    This makes a copy of sys.path, appends any directories given
    as positional arguments, then reverts sys.path to the copied
    settings when the context ends.
 
    Note that *all* sys.path modifications in the body of the
    context manager, including replacement of the object,
    will be reverted at the end of the block.
    cGs-tj|_tj|_tjj|ƒdS(N(RGRitoriginal_valuetoriginal_objecttextend(Rêtpaths((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyRìs  cCs|S(N((Rê((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyRscGs|jt_|jtj(dS(N(R%RGRiR$(RêR((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyRs (R5R6R7RìRR(((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR# s
        cBs2eZdZd„Zd„Zdddd„ZRS(sŽRaise ResourceDenied if an exception is raised while the context manager
    is in effect that matches the specified exception and attributes.cKs||_||_dS(N(R    tattrs(RêR    R ((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyRì)s    cCs|S(N((Rê((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR-scCs}|dk    ryt|j|ƒryxX|jjƒD]8\}}t||ƒsMPnt||ƒ|kr.Pq.q.Wtdƒ‚ndS(s§If type_ is a subclass of self.exc and value has attributes matching
        self.attrs, raise ResourceDenied.  Otherwise let the exception
        propagate (if any).s%an optional resource is not availableN(RRRüR    R(t    iteritemsR›R`R(Rêttype_Rt    tracebackRït
attr_value((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR0sN(R5R6R7RìRRRR(((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR#$s        g>@c #s¢dddddg}d d!d"d#d$g}td|ƒ‰|‰g‰ˆs¥g|D]\}}tt||ƒ^qS‰g|D]\}}tt||ƒ^q~‰n‡‡‡fd†}tjƒ}zÇy%|dk    rètj|ƒndVWn›tk
r‹}    xxtrz|    j    }
t
|
ƒdkrDt |
dtƒrD|
d}    qt
|
ƒdkrvt |
dtƒrv|
d}    qPqW||    ƒ‚nXWdtj|ƒXdS(%s‹Return a context manager that raises ResourceDenied when various issues
    with the Internet connection manifest themselves as exceptions.t ECONNREFUSEDiot
ECONNRESETiht EHOSTUNREACHiqt ENETUNREACHiet    ETIMEDOUTint    EAI_AGAINiýÿÿÿtEAI_FAILiüÿÿÿt
EAI_NONAMEiþÿÿÿt
EAI_NODATAiûÿÿÿt
WSANO_DATAiü*sResource '%s' is not availablecst|ddƒ}t|tjƒsNt|tjƒrB|ˆksN|ˆkr{tsrtjj    ˆj
ddƒnˆ‚ndS(NRis
( R`RRR£RRttgaierrorRRGtstderrRãtargs(terrtn(tcaptured_errnostdeniedt
gai_errnos(sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyt filter_error\s Niii(R-io(R.ih(R/iq(R0ie(R1in(R2iýÿÿÿ(R3iüÿÿÿ(R4iþÿÿÿ(R5iûÿÿÿ(R6iü*( RR`RRtgetdefaulttimeoutRRtsetdefaulttimeouttIOErrorROR9R©R£( t resource_nameRtterrnostdefault_errnostdefault_gai_errnosRCtnumR?t old_timeoutR:ta((R<R=R>sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR$>sH        (+                  % % 
 ccs[ddl}tt|ƒ}tt||jƒƒztt|ƒVWdtt||ƒXdS(sReturn a context manager used by captured_stdout and captured_stdin
    that temporarily replaces the sys stream *stream_name* with a StringIO.iÿÿÿÿN(tStringIOR`RGtsetattr(t stream_nameRJt orig_stdout((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR!€s  cCs
tdƒS(s“Capture the output of sys.stdout:
 
       with captured_stdout() as s:
           print "hello"
       self.assertEqual(s.getvalue(), "hello")
    Re(R!(((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR"ŒscCs
tdƒS(NR8(R!(((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pytcaptured_stderr•scCs
tdƒS(Ntstdin(R!(((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pytcaptured_stdin˜scCs8tjƒtr tjdƒntjƒtjƒdS(sÚForce as many objects as possible to be collected.
 
    In non-CPython implementations of Python, this is needed because timely
    deallocation is not guaranteed by the garbage collector.  (Even in CPython
    this can be the case in case of reference cycles.)  This means that __del__
    methods may be called later than expected and weakrefs may remain alive for
    longer than expected.  This function tries its best to force all garbage
    objects to disappear.
    gš™™™™™¹?N(tgctcollectRRlRm(((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyt
gc_collect›s
 
 
 
t2PtgettotalrefcounttPcCstjt|dƒS(Nt0P(tstructtcalcsizet_header(tfmt((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyt calcobjsize±scCstjt|dƒS(NRW(RXRYt_vheader(R[((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyt calcvobjsize´sii    cCs“tj|ƒ}t|ƒtkr.|jt@sSt|ƒtkrct|ƒjt@rc|tj7}ndt|ƒ||f}|j|||ƒdS(Ns&wrong size for %s: got %d, expected %d(    RGt    getsizeofR™t    __flags__t_TPFLAGS_HEAPTYPEt_TPFLAGS_HAVE_GCt    _testcapitSIZEOF_PYGC_HEADt assertEqual(ttesttotsizetresultRE((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyt check_sizeof»s%cs‡‡fd†}|S(Ncs1‡‡‡fd†}ˆj|_ˆj|_|S(Ncs½y.ddl}t|ˆƒ}|j|ƒ}Wn$tk
rD‚nAd}}n1Xx-ˆD]%}y|j||ƒPWq\q\Xq\Wzˆ||ŽSWd|r¸|r¸|j||ƒnXdS(Niÿÿÿÿ(tlocaleR`t    setlocaleRaRR(R9tkwdsRktcategoryt orig_localetloc(tcatstrRptlocales(sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pytinnerÌs$    (t    func_nameR7(RpRs(RqRr(RpsY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyt    decoratorËs  ((RqRrRu((RqRrsY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR%ÊscCsäidd6td6td6dtd6}tjd|tjtjBƒ}|dkrgtd|fƒ‚ntt    |j
dƒƒ||j
d    ƒj ƒƒ}|a |t kr´t }n|tdkrÚtd
|fƒ‚n|adS( NiR!tmtgtts(\d+(\.\d+)?) (K|M|G|T)b?$sInvalid memory limit %riis$Memory limit %r too low to be useful(t_1Mt_1GRùRút
IGNORECASEtVERBOSERRt
ValueErrortintR¤tgrouptlowertreal_max_memusetMAX_Py_ssize_tt_2GR(tlimittsizesRvtmemlimit((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR&ös   2     ics‡‡‡fd†}|S(sQDecorator for bigmem tests.
 
    'minsize' is the minimum useful size for the test (in arbitrary,
    test-interpreted units.) 'memuse' is the number of 'bytes per size' for
    the test, or a good estimate of it. 'overhead' specifies fixed overhead,
    independent of the testsize, and defaults to 5Mb.
 
    The decorator tries to guess a good value for 'size' and passes it to
    the decorated test function. If minsize * memuse is more than the
    allowed memory use (as defined by max_memuse), the test is skipped.
    Otherwise, minsize is adjusted upward to use up to max_memuse.
    cs7‡‡‡‡fd†}ˆ|_ˆ|_ˆ|_|S(Ncs™ts.d}|j|ˆˆdtkƒn^ttˆˆƒ}|ˆkrutrqtjjdˆjfƒndSt    |dtˆƒ}ˆ||ƒS(Niis)Skipping %s because of memory constraint
i2(
Rt assertFalseRyR~RRGR8RãR5tmax(Rêtmaxsize(RÚtmemusetminsizetoverhead(sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pytwrappers"  (R‹RŠRŒ(RÚR(RŠR‹RŒ(RÚsY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyRus
            ((R‹RŠRŒRu((RŠR‹RŒsY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR' s cs‡‡‡‡fd†}|S(Ncs7‡‡‡‡fd†}ˆ|_ˆ|_ˆ|_|S(Ncsftsd}nˆ}ts"ˆ rYt|ˆkrYtrUtjjdˆjfƒndSˆ||ƒS(Nis)Skipping %s because of memory constraint
(RRRGR8RãR5(RêR‰(tdry_runRÚRŠRh(sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR4s      (RhRŠRŒ(RÚR(RŽRŠRŒRh(RÚsY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyRu3s
            ((RhRŠRŒRŽRu((RŽRŠRŒRhsY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pytprecisionbigmemtest2scs‡fd†}|S(s0Decorator for tests that fill the address space.cs@ttkr2tr<tjjdˆjfƒq<n
ˆ|ƒSdS(Ns)Skipping %s because of memory constraint
(RR‚RRGR8RãR5(Rê(RÚ(sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyRJs
  ((RÚR((RÚsY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR(HscBseZd„ZRS(cCstjƒ}||ƒ|S(N(R@t
TestResult(RêRfRi((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pytrunWs 
(R5R6R‘(((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR)VscCs|S(N((Rb((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyt_id\scCs*t|ƒrtStjdj|ƒƒSdS(Nsresource {0!r} is not enabled(R R’R@tskiptformat(R‰((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pytrequires_resource_s cCstdtƒ|ƒS(s9
    Decorator for tests only applicable on CPython.
    tcpython(t impl_detailRO(Rf((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR/escKs}t|rtS|dkrpt|ƒ\}}|r=d}nd}t|jƒƒ}|jdj|ƒƒ}ntj    |ƒS(Ns*implementation detail not available on {0}s%implementation detail specific to {0}s or (
R0R’RRt _parse_guardstsortedRR”R{R@R“(REtguardst
guardnamestdefault((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR—ks      cCsW|sitd6tfS|jƒd}|jƒ|gt|ƒksLt‚|| fS(NR–i(RORQtvaluesR©Rÿ(Rštis_true((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR˜xs
%cKs.t|ƒ\}}|jtjƒjƒ|ƒS(s5This function returns True or False depending on the host platform.
       Examples:
          if check_impl_detail():               # only on CPython (default)
          if check_impl_detail(jython=True):    # only on Jython
          if check_impl_detail(cpython=False):  # everywhere except on CPython
    (R˜Rtplatformtpython_implementationR€(RšRœ((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR0‚scCs×tr!tjtjddƒ}n    tƒ}|j|ƒ}|jƒsÓt|j    ƒdkrx|j
rx|j    dd}nLt|j
ƒdkr«|j     r«|j
dd}nd}tsÄ|d7}nt |ƒ‚ndS(s2Run tests from a unittest.TestSuite-derived class.t    verbosityiiismultiple errors occurreds!; run in verbose mode for detailsN( RR@tTextTestRunnerRGReR)R‘t wasSuccessfulR©terrorstfailuresR(tsuitetrunnerRiR:((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyt
_run_suiteŽs      cGs¿tjtjf}tjƒ}x|D]ˆ}t|tƒrx|tjkri|jtjtj|ƒƒq­t    dƒ‚q%t||ƒr—|j|ƒq%|jtj
|ƒƒq%Wt |ƒdS(s1Run tests from unittest.TestCase-derived classes.s)str arguments must be keys in sys.modulesN( R@t    TestSuitetTestCaseR£RBRGRHtaddTestt findTestCasesR}t    makeSuiteR¨(tclassest valid_typesR¦tcls((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR*¢s   R–twin32tWITH_DOC_STRINGSstest requires docstringscCs¬ddl}|dkr!t}nd}tj}tƒt_z>|j|d|ƒ\}}|rytd||fƒ‚nWd|t_Xtr¢d|j|fGHn||fS(s Run doctest on the given module.  Return (#failures, #tests).
 
    If optional argument verbosity is not specified (or is None), pass
    test_support's belief about verbosity on to doctest.  Else doctest's
    usual behavior is used (it searches sys.argv for -v).
    iÿÿÿÿNRs%d of %d doctests faileds,doctest (%s) ... %d tests with zero failures(    tdoctestRRRRGReRttestmodRR5(R^R¡R³t save_stdoutRÚRx((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR+Às           
cCstrtjƒfSdSdS(Ni(i(tthreadt_count(((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR,ès cCsTts
dSd}x=t|ƒD]/}tjƒ}||kr?PntjdƒqWdS(Ni
gš™™™™™¹?(R¶R§R·RlRm(t
nb_threadst
_MAX_COUNTtcountR;((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR-îs  cs,ts
ˆStjˆƒ‡fd†ƒ}|S(s¿Use this function when threads are being used.  This will
    ensure that the threads are cleaned up even when the test fails.
    If threading is unavailable this function does nothing.
    cs)tƒ}zˆ|ŒSWdt|ŒXdS(N(R,R-(R9tkey(Rp(sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyRus    (R¶t    functoolstwraps(RpRu((RpsY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyt reap_threadsúscCscttdƒr_d}xGtr[y/tj|tjƒ\}}|dkrLPnWqPqXqWndS(såUse this function at the end of test_main() whenever sub-processes
    are started.  This will help ensure that no extra children (zombies)
    stick around to hog resources and create problems when looking
    for refleaks.
    twaitpidiÿÿÿÿiN(R›RhROR¿tWNOHANG(t any_processtpidtstatus((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR. s         ccs|t||ƒrNt||ƒ}t|||ƒz    dVWdt|||ƒXn*t|||ƒz    dVWdt||ƒXdS(smTemporary swap out an attribute with a new object.
 
    Usage:
        with swap_attr(obj, "attr", 5):
            ...
 
        This will set obj.attr to 5 for the duration of the with: block,
        restoring the old value at the end of the block. If `attr` doesn't
        exist on `obj`, it will be created and then deleted at the end of the
        block.
    N(R›R`RKtdelattr(RbRïtnew_valtreal_val((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyt    swap_attrs         cCs\y|jƒSWnGtk
rWydjd„|DƒƒSWqXtk
rSt|ƒSXnXdS(sZEmulate the py3k bytes() constructor.
 
    NOTE: This is only a best effort function.
    R²css|]}t|ƒVqdS(N(tchr(t.0Rª((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pys    <genexpr>EsN(ttobytesRaR{t    TypeErrortbytes(tb((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR2:s  cCsddl}|jƒS(sZReturn a list of command-line arguments reproducing the current
    settings in sys.flags.iÿÿÿÿN(t
subprocesst_args_from_interpreter_flags(RÎ((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pytargs_from_interpreter_flagsIs cCstjdd|ƒjƒ}|S(sÑStrip the stderr of a Python process from potential debug output
    emitted by the interpreter.
 
    This will typically be run on the result of the communicate() method
    of a subprocess.Popen object.
    s\[\d+ refs\]\r?\n?$R²(Rùtsubtstrip(R8((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyR4Os((ii@i@(i@ii((”R7R5R?t
contextlibRR¼RQRRGRhRŸtshutilR9R@R>tUserDictRùRlRXRct    sysconfigR¶RRt__all__t    ExceptionRRRARtcontextmanagerROR=RQRRNRTR3R1RRRRRdRRR    RKRvRxRzRR
RyR R R RRR˜RšRRRRt PIPE_MAX_SIZER·Rt    NameErrorRRCRR£tTESTFN_UNICODER¹tTESTFN_ENCODINGR›R³tTESTFN_UNENCODABLEtevalR¸RºR”tgetpidR»RRRàRRRÐRRtobjectRçR
RRRt    DictMixinR R#R#R$R!R"RNRPRSRZR]R\R^RbRaRjR%RyRzRƒt_4GR‰R‚R&R'RR(R)R’R•R/R—R˜R0R¨R*tget_config_vartHAVE_DOCSTRINGSt
skipUnlesstrequires_docstringsR+R,R-R¾R.RÇR2RÐR4(((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_support.pyt<module>sR                    
                                          &                  !                                         <     
 
                        #             * ' /A                     
                %
 
 
        '                    
                    (