��Qc@s�ddlZddlZddlZejddkrdyddlZWqjek
r`dZqjXndZddlZddlm Z m
Z
mZmZdej
fd��YZd�Zedkr�ejd d
�ndS(i�Nii(tdbttest_supporttget_new_environment_pathtget_new_database_pathtpickleTestCasecBsJeZdZdZd�Zd�Zd�Zd�ZerHd�Z nRS(s0Verify that DBError can be pickled and unpickleds
test-dbobj.dbcCst�|_dS(N(RthomeDir(tself((s,/sys/lib/python2.7/bsddb/test/test_pickle.pytsetUpscCsDt|d�r|`nt|d�r0|`ntj|j�dS(NRtenv(thasattrRRRtrmtreeR(R((s,/sys/lib/python2.7/bsddb/test/test_pickle.pyttearDowns
cCsJtj�|_|jj|jtjtjB�tj|j�|_|jj|jtj tj�|jj
dd�|j|jdd�y |jj
dddtj�Wnstj
k
r"}|j|�}|j|�}|j|jks
t|�t|�kr,t|d|f�q,n
Xtd�|jj�|jj�dS(Ntspamteggsthamtflagss!=swhere's my DBError exception?!?(RtDBEnvRtopenRt DB_CREATEt
DB_INIT_MPOOLtDBtdb_nametDB_HASHtputtassertEqualtDB_NOOVERWRITEtDBErrortdumpstloadstargsttypet Exceptiontclose(Rtpickleteggt
pickledEggt rottenEgg((s,/sys/lib/python2.7/bsddb/test/test_pickle.pyt_base_test_pickle_DBError"s *
cCs|jdt�dS(NR!(R%R!(R((s,/sys/lib/python2.7/bsddb/test/test_pickle.pyttest01_pickle_DBError7scCs|jdt�dS(NR!(R%tcPickle(R((s,/sys/lib/python2.7/bsddb/test/test_pickle.pyttest02_cPickle_DBError;s(
t__name__t
__module__t__doc__RRRR%R&R'R((((s,/sys/lib/python2.7/bsddb/test/test_pickle.pyRs cCs
tjt�S(N(tunittestt makeSuiteR(((s,/sys/lib/python2.7/bsddb/test/test_pickle.pyt
test_suite@st__main__tdefaultTestR.(tosR!tsystversion_infoR'tImportErrortNoneR,ttest_allRRRRtTestCaseRR.R)tmain(((s,/sys/lib/python2.7/bsddb/test/test_pickle.pyt<module>s
",
|