%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/self/root/opt/plesk/python/2.7/lib64/python2.7/bsddb/test/
Upload File :
Create Path :
Current File : //proc/self/root/opt/plesk/python/2.7/lib64/python2.7/bsddb/test/test_misc.pyo

�
5}�ac@s�dZddlZddlZddlZddlmZmZmZmZm	Z	m
Z
dejfd��YZd�Z
edkr�ejdd	�ndS(
s&Miscellaneous bsddb module test cases
i����N(tdbtdbshelvethashopenttest_supporttget_new_environment_pathtget_new_database_pathtMiscTestCasecBsbeZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�ZRS(
cCst�|_t�|_dS(N(RtfilenameRthomeDir(tself((s=/opt/plesk/python/2.7/lib64/python2.7/bsddb/test/test_misc.pytsetUpscCs$tj|j�tj|j�dS(N(RtunlinkRtrmtreeR(R	((s=/opt/plesk/python/2.7/lib64/python2.7/bsddb/test/test_misc.pyttearDownscCs9tj|j�}|j�|jtj|jd�dS(Ntfoo(RtopenRtclosetassertRaisesRtDBErrortget(R	tdbs((s=/opt/plesk/python/2.7/lib64/python2.7/bsddb/test/test_misc.pyttest01_badpointers
cCs�tj�}|j|j�|j|jtj�tjddkr^|j	|j|j�n|j	t
|jd�|j�dS(Niitascii(RtDBEnvtassertIsNonetdb_homeRRt	DB_CREATEtsystversion_infotassertEqualtbytes(R	tenv((s=/opt/plesk/python/2.7/lib64/python2.7/bsddb/test/test_misc.pyttest02_db_homescCs9t|j�}|j�t|�}|j|d�dS(Ns{}(RRRtreprR(R	Rtrp((s=/opt/plesk/python/2.7/lib64/python2.7/bsddb/test/test_misc.pyttest03_repr_closed_db#s
cCs�t|j�}i}xHtd�D]:}td|�|t|�<td|�|t|�<q"W|j�t|j�}t|�}|j|t|��|j�dS(Nid(RRtxrangeR!RR(R	RtdtiR"((s=/opt/plesk/python/2.7/lib64/python2.7/bsddb/test/test_misc.pyttest04_repr_db)s
cCsyzWtj�}|j|jdtjtjtjB�|j�}|j	dtj
�}Wd|j�tj
|j�XdS(Ns/foo(RtDBRRtNonetDB_BTREERt	DB_THREADtcursorRtDB_SETRRR(R	tdb1tcurstt((s=/opt/plesk/python/2.7/lib64/python2.7/bsddb/test/test_misc.pyttest05_double_free_make_key_dbt<s
cCs�z�tj�}|j|jdtjtj�d|d<d|d<d|d<d|d<|j�}|j�|j	ddddg|�|j	|dd�|j	|dd�|j	|dd�|j	|dd�Wd|j
�tj|j�XdS(	Nseh?taseh zed.sas
eh zed eh?saas	eh eh eh!taaa(
RR(RRR)tDB_HASHRtkeystsortRRRR(R	R.R5((s=/opt/plesk/python/2.7/lib64/python2.7/bsddb/test/test_misc.pyttest06_key_with_null_bytesIs 





cCs"ztj�}|jtj�|j|jtjtj�d|d<d|d<|jdg|j	��|j
dd�|jddg|j	��|j�tj�}|j|jtj�|jd	d
g|j	��d|d<|jdg|j	��Wd|j�tj
|j�XdS(NtehR2tAtAasnew A(R2R9(R2R9(R2R:(R2R9(R2R:(R2snew A(RR(t	set_flagst
DB_DUPSORTRRR4RRtitemstputRRR(R	R.((s=/opt/plesk/python/2.7/lib64/python2.7/bsddb/test/test_misc.pyttest07_DB_set_flags_persists\s"




cCs�|jttjt��x�tjj�D]w\}}|jd�r)|jd�r)|jt|tj�d|�|dkr�|j	t|t
�d|�q�q)q)W|jttjt
��|jttjt
��dS(NR(tErrortmsgtDBKeyEmptyErrortDBNotFoundError(RBRC(
t
assertTruet
issubclassRRt	Exceptiont__dict__R=t
startswithtendswithtassertFalsetKeyErrorRBRC(R	R&tj((s=/opt/plesk/python/2.7/lib64/python2.7/bsddb/test/test_misc.pyttest08_ExceptionTypesus&(t__name__t
__module__R
R
RR R#R'R1R7R?RM(((s=/opt/plesk/python/2.7/lib64/python2.7/bsddb/test/test_misc.pyRs				
			
		cCs
tjt�S(N(tunittestt	makeSuiteR(((s=/opt/plesk/python/2.7/lib64/python2.7/bsddb/test/test_misc.pyt
test_suite�st__main__tdefaultTestRR(t__doc__tosRRPttest_allRRRRRRtTestCaseRRRRNtmain(((s=/opt/plesk/python/2.7/lib64/python2.7/bsddb/test/test_misc.pyt<module>s.z	

Zerion Mini Shell 1.0