%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/lib/python2.7/test/
Upload File :
Create Path :
Current File : //usr/local/lib/python2.7/test/test_pkgutil.pyc

ó
Nêáac@sÑddlmZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
dejfd„ƒYZdejfd„ƒYZ
d„ZedkrÍeƒndS(	iÿÿÿÿ(trun_unittestNtPkgutilTestscBs5eZd„Zd„Zd„Zd„Zd„ZRS(cCs?tjƒ|_|jtj|jƒtjjd|jƒdS(Ni(	ttempfiletmkdtemptdirnamet
addCleanuptshutiltrmtreetsystpathtinsert(tself((s-/usr/local/lib/python2.7/test/test_pkgutil.pytsetUpscCstjd=dS(Ni(RR	(R((s-/usr/local/lib/python2.7/test/test_pkgutil.pyttearDownscCs4d}d}tjj|j|ƒ}tj|ƒttjj|dƒdƒ}|jƒttjj|dƒdƒ}|j|ƒ|jƒtjtjj|dƒƒttjj|ddƒdƒ}|j|ƒ|jƒtj	|dƒ}|j
||ƒtj	|dƒ}|j
||ƒtj|=dS(Nttest_getdata_filesyss%Hello, world!
Second line
Third lines__init__.pytwbsres.txttsubssub/res.txt(
tosR	tjoinRtmkdirtopentclosetwritetpkgutiltget_datatassertEqualRtmodules(Rtpkgt
RESOURCE_DATAtpackage_dirtftres1tres2((s-/usr/local/lib/python2.7/test/test_pkgutil.pyRs$



!

cCsñd}d}d}tjj|j|ƒ}tj|dƒ}|j|ddƒ|j|d|ƒ|j|d|ƒ|jƒtjj	d	|ƒt
j|d
ƒ}|j||ƒt
j|dƒ}|j||ƒtjd	=tj
|=dS(Nstest_getdata_zipfile.zipttest_getdata_zipfiles%Hello, world!
Second line
Third linetws/__init__.pyts/res.txts/sub/res.txtisres.txtssub/res.txt(RR	RRtzipfiletZipFiletwritestrRRR
RRRR(RtzipRRtzip_filetzRR ((s-/usr/local/lib/python2.7/test/test_pkgutil.pyR!5s 

cCsud}tjj|j|ƒ}tj|dƒ|jtj|ƒx-tjd|jgƒD]}|j	dƒqZWdS(Ntunreadable_packageiR	sunexpected package found(
RR	RRRRtrmdirRt
walk_packagestfail(Rtpackage_nametdtt((s-/usr/local/lib/python2.7/test/test_pkgutil.pyttest_unreadable_dir_on_syspathQs(t__name__t
__module__RR
RR!R1(((s-/usr/local/lib/python2.7/test/test_pkgutil.pyRs
				tPkgutilPEP302TestscBsXeZdefd„ƒYZdefd„ƒYZd„Zd„Zd„Zd„ZRS(tMyTestLoadercBseZd„Zd„ZRS(cCsgtjj|tj|ƒƒ}d|jj|_||_g|_	|j
jddƒd|j
d<|S(Ns<%s>tloadsii(RRt
setdefaulttimpt
new_modulet	__class__R2t__file__t
__loader__t__path__t__dict__tget(Rtfullnametmod((s-/usr/local/lib/python2.7/test/test_pkgutil.pytload_module_s		 cCsdS(Ns
Hello, world!((RR	((s-/usr/local/lib/python2.7/test/test_pkgutil.pyRjs(R2R3RBR(((s-/usr/local/lib/python2.7/test/test_pkgutil.pyR5^s	tMyTestImportercBseZdd„ZRS(cCs
tjƒS(N(R4R5(RR@R	((s-/usr/local/lib/python2.7/test/test_pkgutil.pytfind_modulensN(R2R3tNoneRD(((s-/usr/local/lib/python2.7/test/test_pkgutil.pyRCmscCstjjd|jƒƒdS(Ni(Rt	meta_pathR
RC(R((s-/usr/local/lib/python2.7/test/test_pkgutil.pyRqscCstjd=dS(Ni(RRF(R((s-/usr/local/lib/python2.7/test/test_pkgutil.pyR
tscCs*|jtjddƒdƒtjd=dS(Ntfootdummys
Hello, world!(RRRRR(R((s-/usr/local/lib/python2.7/test/test_pkgutil.pyttest_getdata_pep302wscCs\ddl}|j|jdƒ|jtjddƒdƒ|j|jdƒtjd=dS(NiÿÿÿÿiRGRHs
Hello, world!(RGRR6RRRR(RRG((s-/usr/local/lib/python2.7/test/test_pkgutil.pyttest_alreadyloaded|s
(	R2R3tobjectR5RCRR
RIRJ(((s-/usr/local/lib/python2.7/test/test_pkgutil.pyR4\s			cCs*tttƒddl}|jjƒdS(Niÿÿÿÿ(RRR4t	zipimportt_zip_directory_cachetclear(RL((s-/usr/local/lib/python2.7/test/test_pkgutil.pyt	test_main†s
t__main__(ttest.test_supportRtunittestRR8RRtos.pathRRR$tTestCaseRR4ROR2(((s-/usr/local/lib/python2.7/test/test_pkgutil.pyt<module>sN*	

Zerion Mini Shell 1.0