Current File : //opt/imh-python/lib/python2.7/test/test_resource.pyc
�
��Wc@svddlZddlmZddlZejd�Zdejfd��YZdd�Z	e
dkrre	�ndS(i����N(ttest_supporttresourcetResourceTestcBs>eZd�Zd�Zd�Zd�Zd�Zd�ZRS(cCs_|jttj�|jttjdd�|jttj�|jttjddd�dS(Ni*(tassertRaisest	TypeErrorRt	getrlimitt	setrlimit(tself((sk/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_resource.pyt	test_argsscCsmytjtj�\}}Wntk
r<|jd�nX|jtj|�tjtj||f�dS(NsRLIMIT_FSIZE not available(RRtRLIMIT_FSIZEtAttributeErrortskipTesttassertEqualt
RLIM_INFINITYR(Rtcurtmax((sk/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_resource.pyttest_fsize_ismaxs
cCsxytjtj�\}}Wntk
r<|jd�nXzy#tjtjd|f�t}Wntk
r|t}nXt	t
jd�}z�|jdd�yI|jd�|j
�x+td�D]}tjd�|j
�q�WWntk
r|s�qnX|r.tjtj||f�nWd|j�XWd|rctjtj||f�nt
jt
j�XdS(NsRLIMIT_FSIZE not availableitwbtXtYig�������?(RRR	R
RRtTruet
ValueErrortFalsetopenRtTESTFNtwritetflushtrangettimetsleeptIOErrortclosetunlink(RRRt	limit_settfti((sk/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_resource.pyttest_fsize_enforceds8








 cCs�d}ytjtj�\}}Wntk
rB|jd�nXytjtj||f�Wnttfk
rynXytjtj||f�Wnttfk
r�nXdS(Nl
i2sRLIMIT_FSIZE not availablel +�O��tC3�y+v�(RRR	R
RRt
OverflowErrorR(Rttoo_bigRR((sk/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_resource.pyttest_fsize_toobigLs
cCs�|jttj�|jttjdd�tjtj�}tjtj�}ytjtj�}Wnttfk
rnXdS(Ni*(	RRRt	getrusagetRUSAGE_SELFtRUSAGE_CHILDRENtRUSAGE_BOTHRR
(Rt	usageselft
usagechildrent	usageboth((sk/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_resource.pyttest_getrusage\scCsdytjtj�}Wntk
r6|jd�nXddd��Y}tjtj|��dS(NsRLIMIT_CPU not availabletBadSequencecBseZd�Zd�ZRS(cSsdS(Ni((R((sk/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_resource.pyt__len__nscSs,|dkr"tttd���St�dS(Niii@B(ii(tlenttupleRt
IndexError(Rtkey((sk/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_resource.pyt__getitem__ps(t__name__t
__module__R1R6(((sk/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_resource.pyR0ms	((RRt
RLIMIT_CPUR
RR(RtlimitsR0((sk/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_resource.pyttest_setrusage_refcounths
(R7R8RRR$R'R/R;(((sk/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_resource.pyR	s		
	.		cCstjt�dS(N(Rtrun_unittestR(tverbose((sk/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_resource.pyt	test_mainwst__main__(tunittestttestRRt
import_moduleRtTestCaseRtNoneR>R7(((sk/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_resource.pyt<module>sn