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
Q\¬Qc@sÒddlZddlZddlZddlZddlmZdZdZdZdZ    dZ
edZ e ed    d
ƒZ e e d    d
ƒZe eed    d
ƒZe e
eed    d
ƒZe eed    d
ƒZe e    ed    d
ƒZe e
eed    d
ƒZd Zd dd „ƒYZdefd„ƒYZdefd„ƒYZddd„ƒYZdd d„ƒYZdd!d„ƒYZdejfd„ƒYZdefd„ƒYZd„ZedkrÎeƒndS("iÿÿÿÿN(t test_supportsHdef get_name():
    return __name__
def get_file():
    return __file__
s import sub
sfrom . import sub
sfrom .... import sub
s'from __future__ import absolute_import
sreloaded = True
s<???>texecs !!!_test_!!!t TestImportercBsÇeZi eefd6eefd6eefd6eefd6eefd6eefd6eefd6eefd6ee    fd6eefd    6eefd
6Z
e d „Z d „Z dd „Zd„ZRS(thooktestmodulethooktestpackageshooktestpackage.subshooktestpackage.sub.subbershooktestpackage.oldabsshooktestpackage.newabsshooktestpackage.newrels!hooktestpackage.sub.subber.subestshooktestpackage.futreltsubt reloadmodulecCs"|tkrt‚n||_dS(N(t    test_patht ImportErrortpath(tselfR    ((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_importhooks.pyt__init__4s     cCs
t‚dS(N(tNotImplementedError(R
((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_importhooks.pyt _get__path__;scCs||jkr|SdSdS(N(tmodulestNone(R
tfullnameR    ((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_importhooks.pyt find_module>scBst|j|\}}ejj|ej|ƒƒ}d|jj|_||_|re|j    ƒ|_
n||j U|S(Ns<%s>( Rtsyst
setdefaulttimpt
new_modulet    __class__t__name__t__file__t
__loader__R t__path__t__dict__(R
Rtispkgtcodetmod((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_importhooks.pyt load_moduleDs     N(Rt
__module__tFalsettest_cotTruettest2_oldabs_cottest2_newabs_cottest2_newrel_cottest2_deeprel_cottest2_futrel_coRRR R RRR(((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_importhooks.pyR$s                 t MetaImportercBseZd„ZRS(cCsgS(N((R
((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_importhooks.pyR Ps(RR R (((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_importhooks.pyR)Ost PathImportercBseZd„ZRS(cCs
|jgS(N(R    (R
((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_importhooks.pyR Ts(RR R (((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_importhooks.pyR*Sst ImportBlockercBs,eZdZd„Zdd„Zd„ZRS(s‘Place an ImportBlocker instance on sys.meta_path and you
    can be sure the modules you specified can't be imported, even
    if it's a builtin.cGstj|ƒ|_dS(N(tdicttfromkeyst namestoblock(R
R.((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_importhooks.pyR \scCs||jkr|SdS(N(R.R(R
RR    ((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_importhooks.pyR^scCs td‚dS(Ns
I dare you(R(R
R((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_importhooks.pyRbsN(RR t__doc__R RRR(((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_importhooks.pyR+Xs     t
ImpWrappercBs eZdd„Zdd„ZRS(cCs5|dk    r(tjj|ƒ r(t‚n||_dS(N(RtosR    tisdirR(R
R    ((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_importhooks.pyR hs    cCsš|jdƒd}||kr2|jdkr2dS|jdkrJd}n |jg}ytj||ƒ\}}}Wntk
r‰dSXt|||ƒS(Nt.iÿÿÿÿ(tsplitR    RRRRt    ImpLoader(R
RR    tsubnametfiletfilenametstuff((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_importhooks.pyRms      N(RR RR R(((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_importhooks.pyR0fs R5cBseZd„Zd„ZRS(cCs||_||_||_dS(N(R7R8R9(R
R7R8R9((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_importhooks.pyR ~s        cCsGtj||j|j|jƒ}|jr:|jjƒn||_|S(N(RRR7R8R9tcloseR(R
RR((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_importhooks.pyRƒs
!        (RR R R(((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_importhooks.pyR5|s    tImportHooksBaseTestCasecBseZd„Zd„ZRS(cCsJtj|_tj|_tj|_tjjƒtjjƒ|_dS(N(    RR    t    meta_patht
path_hookstpath_importer_cachetclearRtcopytmodules_before(R
((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_importhooks.pytsetUps
    cCsX|jtj(|jtj(|jtj(tjjƒtjjƒtjj|jƒdS(N(    R    RR<R=R>R?RtupdateRA(R
((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_importhooks.pyttearDown”s      (RR RBRD(((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_importhooks.pyR;‹s    tImportHooksTestCasecBs8eZdd„Zd„Zd„Zd„Zd„ZRS(cCs¶ddl}ddl}ddl}ddl}|j|jƒdƒ|j|jƒdƒ|j|jjƒdƒ|j|jjjƒdƒ|rï|j|j|ƒ|j|j|ƒ|j|jj|ƒ|j|jjj|ƒnt    t
ft j d<ddl }|jt|dƒƒt    tft j d<tj|ƒ|jt|dƒƒddl}|j|jjƒdƒ|j|jj|jƒddl}|j|jjƒd    ƒ|j|jj|jƒddljjj}|j|jƒd
ƒ|j|j|jƒddl}|j|jjƒd ƒ|j|jj|jƒddl}|j|jƒd ƒddl}|j|jjƒd ƒ|j|jj|ƒdS(NiÿÿÿÿRRshooktestpackage.subshooktestpackage.sub.subberRtreloadedshooktestpackage.oldabsshooktestpackage.newrels!hooktestpackage.sub.subber.subestshooktestpackage.futrelRshooktestpackage.newabs(RRthooktestpackage.subthooktestpackage.sub.subbert assertEqualtget_nameRtsubberRR!R"RRRt assertFalsethasattrt    reload_coRtreloadt
assertTruethooktestpackage.oldabstoldabsthooktestpackage.newreltnewrelt!hooktestpackage.sub.subber.subesttsubestthooktestpackage.futreltfutrelthooktestpackage.newabstnewabs(R
timporterRRRRVR((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_importhooks.pyt doTestImportsŸsb       
 
 
 
  cCs*tƒ}tjj|ƒ|j|ƒdS(N(R)RR<tappendR\(R
ti((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_importhooks.pyt testMetaPathÚs    cCs.tjjtƒtjjtƒ|jƒdS(N(RR=R]R*R    RR\(R
((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_importhooks.pyt testPathHookßscCs@d}tj|ƒtjjt|ƒƒ|jtt|ƒdS(Nt
exceptions(    RtunloadRR<R]R+t assertRaisesRt
__import__(R
tmname((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_importhooks.pyt testBlockeräs c
Csßtƒ}tjj|ƒtjjtƒd    }xW|D]O}|jdƒd}x3tjjƒD]"}|j|ƒr_tj|=q_q_Wq6Wt    j
dt fƒ;x3|D]+}t |t ƒtƒdgƒ}|jq¦WWdQXdS(
Ntcolorsysturlparsesdistutils.cores compiler.miscR3is.The compiler package is deprecated and removedt    __dummy__(RgRhsdistutils.cores compiler.misc(R0RR<R]R=R4Rtkeyst
startswithRtcheck_warningstDeprecationWarningRdtglobalstlocalsR(R
R^tmnamesRetparenttntm((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_importhooks.pyttestImpWrapperês           N(RR RR\R_R`RfRt(((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_importhooks.pyREs
 ;            cCstjtƒdS(N(Rt run_unittestRE(((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_importhooks.pyt    test_mainûst__main__((((( RRR1tunittestttestRttest_srctabsimptrelimpt
deeprelimptfutimpt
reload_srctcompileR"RNR$R%R&R'R(RRR)R*R+R0R5tTestCaseR;RERvR(((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_importhooks.pyt<module>s<    +^