��Qc@s�dZddlZddlZddlZddlmZmZmZdejfd��YZ d�Z
edkr�ejdd �ndS(
s.
TestCases for checking set_get_returns_none.
i�N(tdbtverbosetget_new_database_pathtGetReturnsNoneTestCasecBs,eZd�Zd�Zd�Zd�ZRS(cCst�|_dS(N(Rtfilename(tself((s./sys/lib/python2.7/bsddb/test/test_get_none.pytsetUpscCs/ytj|j�Wntjk
r*nXdS(N(tostremoveRterror(R((s./sys/lib/python2.7/bsddb/test/test_get_none.pyttearDownscCs/tj�}|j|jtjtj�|jd�x%tjD]}|j ||d�q?W|j
d�}|j|d�|j
tjd�}|j|tjdd�d}|j
�}|j�}x |r�d}|j�}q�W|j|d�|j|ttj��|j�|j�dS(Nii(sbad keyi(RtDBtopenRtDB_BTREEt DB_CREATEtset_get_returns_nonetstringtletterstputtgettassertEqualtNonetcursortfirsttnexttlentclose(Rtdtxtdatatcounttctrec((s./sys/lib/python2.7/bsddb/test/test_get_none.pyttest01_get_returns_nones&
cCsttj�}|j|jtjtj�|jd�x%tjD]}|j ||d�q?W|j
tj|jd�|j
t
|jd�|jtjd�}|j|tjdd�d}d}|j�}|j�}xB|r%|d}y|j�}Wq�tjk
r!d}Pq�q�|j|d�|j|�|j|ttj��|j�|j�dS(Nii(sbad keyi(RRRRR
RRRRRtassertRaisestDBNotFoundErrorRtKeyErrorRRRRtassertNotEqualRt
assertTrueRR(RRRRRtexceptionHappenedRR ((s./sys/lib/python2.7/bsddb/test/test_get_none.pyttest02_get_raises_exception4s2
(t__name__t
__module__RR
R!R((((s./sys/lib/python2.7/bsddb/test/test_get_none.pyR
s cCs
tjt�S(N(tunittestt makeSuiteR(((s./sys/lib/python2.7/bsddb/test/test_get_none.pyt
test_suiteWst__main__tdefaultTestR-(
t__doc__RRR+ttest_allRRRtTestCaseRR-R)tmain(((s./sys/lib/python2.7/bsddb/test/test_get_none.pyt<module>sJ
|