KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21572/root/usr/lib/python2.4/test/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21572/root/usr/lib/python2.4/test/test_importhooks.pyc
mò
‚=5Dc@sJdkZdkZdkZdkZdklZdZedZeeddƒZ	eeddƒZ
dZdfd„ƒYZd	fd
„ƒYZ
de
fd„ƒYZd
e
fd„ƒYZdfd„ƒYZdfd„ƒYZdfd„ƒYZdeifd„ƒYZdefd„ƒYZd„ZedjoeƒndS(N(stest_supportsHdef get_name():
    return __name__
def get_file():
    return __file__
sreloaded = True
s<???>texecs!!!_test_!!!t
ImportTrackercBs#tZdZd„Zed„ZRS(s,Importer that only tracks attempted imports.cCs
g|_dS(N(tselftimports(R((t+/usr/lib/python2.4/test/test_importhooks.pyt__init__scCs|ii|ƒdS(N(RRtappendtfullnametNone(RRtpath((Rtfind_modules(t__name__t
__module__t__doc__RRR
(((RRs	tTestImportercBsƒtZhdeef<deef<deef<deef<deef<Zed„Zd„Zdd„Z
d	„ZRS(
Nthooktestmodulethooktestpackageshooktestpackage.subshooktestpackage.sub.subbertreloadmodulecCs$|tjo
t‚n||_dS(N(R	t	test_pathtImportErrorR(RR	((RR,s

cCs
t‚dS(N(tNotImplementedError(R((Rt_get__path__3scCs ||ijo|SndSdS(N(RRtmodulesR(RRR	((RR
6scBsv|i|\}}eii|ei|ƒƒ}d|i
i|_||_
|o|iƒ|_n||iU|S(Ns<%s>(RRRtispkgtcodetsyst
setdefaulttimpt
new_moduletmodt	__class__Rt__file__t
__loader__Rt__path__t__dict__(RRRRR((Rtload_module<s	(RRtFalsettest_cotTrueRRRRRR
R#(((RR"s
Q	tMetaImportercBstZd„ZRS(NcCsgS(N((R((RRHs(RRR(((RR'GstPathImportercBstZd„ZRS(NcCs
|igS(N(RR	(R((RRLs(RRR(((RR(Kst
ImportBlockercBs,tZdZd„Zed„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.cGsti|ƒ|_dS(N(tdicttfromkeystnamestoblockR(RR,((RRTscCs||ijo|SndS(N(RRR,R(RRR	((RR
VscCs
td‚dS(Ns
I dare you(R(RR((RR#Zs(RRR
RRR
R#(((RR)Ps	t
ImpWrappercBs tZdd„Zdd„ZRS(NcCs8|dj	otii|ƒo
t‚n||_dS(N(R	RtostisdirRR(RR	((RR`s!
cCs§|idƒd}||jo|idjodSn|idjo
d}n
|ig}yti||ƒ\}}}Wntj
odSnXt|||ƒS(Nt.iÿÿÿÿ(
RtsplittsubnameRR	RRR
tfiletfilenametstuffRt	ImpLoader(RRR	R4R5R2R3((RR
es
	(RRRRR
(((RR-^sR6cBstZd„Zd„ZRS(NcCs||_||_||_dS(N(R3RR4R5(RR3R4R5((RRvs		cCsIti||i|i|iƒ}|io|iiƒn||_	|S(N(
RR#RRR3R4R5RtcloseR (RRR((RR#{s
!
	(RRRR#(((RR6ts	tImportHooksBaseTestCasecBstZd„Zd„ZRS(NcCsZti|_ti|_ti|_tiiƒtƒ|_tii	d|iƒdS(Ni(
RR	Rt	meta_patht
path_hookstpath_importer_cachetclearRttrackertinsert(R((RtsetUp…s



cCsm|iti(|iti(|iti(tiiƒx2|iiD]$}|ti
joti
|=qAqAWdS(N(RR	RR9R:R;R<R=RRR(RR((RttearDowns




(RRR?R@(((RR8ƒs	tImportHooksTestCasecBs8tZdd„Zd„Zd„Zd„Zd„ZRS(NcCsNdk}dk}dk}dk}|i|iƒdƒ|i|iƒdƒ|i|iiƒdƒ|i|iiiƒdƒ|oY|i|i
|ƒ|i|i
|ƒ|i|ii
|ƒ|i|iii
|ƒnttft
id<dk}|it|dƒƒttft
id<t|ƒ|it|dƒƒdS(NRRshooktestpackage.subshooktestpackage.sub.subberRtreloaded(RRthooktestpackage.subthooktestpackage.sub.subberRtassertEqualtget_nametsubtsubbertimporterR R$R%RRRtfailIfthasattrt	reload_cotreloadt
failUnless(RRIRRR((Rt
doTestImports™s.					
cCs*tƒ}tii|ƒ|i|ƒdS(N(R'tiRR9RRRO(RRP((RttestMetaPath´s	cCs.tiitƒtiitƒ|iƒdS(N(RR:RR(R	RRRO(R((RttestPathHook¹scCssd}|tijoti|=ntiit|ƒƒyt|ƒWntj
onX|i	d|ƒdS(Nt
exceptionss&'%s' was not supposed to be importable(
tmnameRRR9RR)t
__import__RRtfail(RRT((RttestBlocker¾scCsétƒ}tii|ƒtiitƒd	}xY|D]Q}|idƒd}x5ti
iƒD]$}|i
|ƒoti
|=q_q_Wq6Wx3|D]+}t|tƒtƒdgƒ}|iq’Wyti
d=Wntj
onXdS(
Ntcolorsysturlparsesdistutils.cores
compiler.miscR0it	__dummy__turllib(RXRYsdistutils.cores
compiler.misc(R-RPRR9RR:tmnamesRTR1tparentRtkeystnt
startswithRUtglobalstlocalstmR tKeyError(RR]R\RPRTRcR_((RttestImpWrapperÊs&	(RRRRORQRRRWRe(((RRA—s
			cCstitƒdS(N(ttest_supporttrun_unittestRA(((Rt	test_mainßst__main__(RRR.tunittestttestRfttest_srct
reload_srctcompileR%RLRRRR'R(R)R-R6tTestCaseR8RARhR(RfRLRmRlRjR6RRRR-RhR(RAR8RR'R%RR)R.((Rt?s*				

	%H	


Anon7 - 2021