Current File : //opt/imh-python/lib/python2.7/test/test_pkgutil.pyc
�
��Wc@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((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_pkgutil.pytsetUpscCstjd=dS(Ni(RR	(R((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/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((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/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 ((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/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((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_pkgutil.pyttest_unreadable_dir_on_syspathQs(t__name__t
__module__RR
RR!R1(((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/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((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_pkgutil.pytload_module_s		 cCsdS(Ns
Hello, world!((RR	((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_pkgutil.pyRjs(R2R3RBR(((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_pkgutil.pyR5^s	tMyTestImportercBseZdd�ZRS(cCs
tj�S(N(R4R5(RR@R	((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_pkgutil.pytfind_modulensN(R2R3tNoneRD(((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_pkgutil.pyRCmscCstjjd|j��dS(Ni(Rt	meta_pathR
RC(R((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_pkgutil.pyRqscCstjd=dS(Ni(RRF(R((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_pkgutil.pyR
tscCs*|jtjdd�d�tjd=dS(Ntfootdummys
Hello, world!(RRRRR(R((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_pkgutil.pyttest_getdata_pep302wscCs\ddl}|j|jd�|jtjdd�d�|j|jd�tjd=dS(Ni����iRGRHs
Hello, world!(RGRR6RRRR(RRG((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_pkgutil.pyttest_alreadyloaded|s
(	R2R3tobjectR5RCRR
RIRJ(((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_pkgutil.pyR4\s			cCs*ttt�ddl}|jj�dS(Ni����(RRR4t	zipimportt_zip_directory_cachetclear(RL((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_pkgutil.pyt	test_main�s
t__main__(ttest.test_supportRtunittestRR8RRtos.pathRRR$tTestCaseRR4ROR2(((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_pkgutil.pyt<module>sN*