��Qc@s�dZddlZddlZddlmZmZmZmZmZm Z ddddddgZ
dddddd d!gZdejfd��YZ
d�ZdS("s@TestCases for using the DB.join and DBCursor.join_item methods.
i�N(tdbtdbshelvettest_supporttverbosetget_new_environment_pathtget_new_database_pathtapplesConvenience Storet blueberrysFarmer's MarkettshotgunsS-Marttpeartchainsawt
strawberrytbluetredtyellowtpeachtblacktJoinTestCasecBs)eZdZd�Zd�Zd�ZRS(tcCsY|jjd|_t�|_tj�|_|jj|jtj tj
BtjB�dS(Ns.db(t __class__t__name__tfilenameRthomeDirRtDBEnvtenvtopent DB_CREATEt
DB_INIT_MPOOLtDB_INIT_LOCK(tself((s*/sys/lib/python2.7/bsddb/test/test_join.pytsetUp#scCs!|jj�tj|j�dS(N(RtcloseRtrmtreeR(R((s*/sys/lib/python2.7/bsddb/test/test_join.pyttearDown)s
cCs�tr%dGddGHd|jjGHntj|j�}|j|jdtjtj �t
|d�t�tj|j�}|jtj
tjB�|j|jdtjtj �t
|d�t�d}d}z�|j�}|jd �}|j|�|j|g�}|jd
�dkr2|jd
�n|j�dkrT|jd�n|jd
�d
dkr}|jd�n|jd
�r�|jd�nWd|r�|j�n|r�|j�n|j�|j�XdS(Ns
s-=isRunning %s.test01_join...tprimarycSs
|j|�S(N(tput(tttpriDB((s*/sys/lib/python2.7/bsddb/test/test_join.pyt<lambda>6st secondarycSs
|j|�S(N(R#(R$tsecDB((s*/sys/lib/python2.7/bsddb/test/test_join.pyR&<sR
iRsConvenience Storesjoin cursor positioned wrongR
s&DBCursor.join_item returned wrong itemRs join cursor returned wrong things#join cursor returned too many items(RsConvenience Store(RRRRtDBRRRtDB_BTREERtmaptProductIndext set_flagstDB_DUPt
DB_DUPSORTt
ColorIndextNonetcursortsett
assertTruetjointgettfailt join_itemR(RR%R(tsCursortjCursorttmp((s*/sys/lib/python2.7/bsddb/test/test_join.pyttest01_join-s@
(Rt
__module__tkeytypeRR!R<(((s*/sys/lib/python2.7/bsddb/test/test_join.pyR s cCs&tj�}|jtjt��|S(N(tunittestt TestSuitetaddTestt makeSuiteR(tsuite((s*/sys/lib/python2.7/bsddb/test/test_join.pyt
test_suite^s(sapplesConvenience Store(RsFarmer's Market(RsS-Mart(R sFarmer's Market(schainsawsS-Mart(s
strawberrysFarmer's Market(RR(sredsapple(sredschainsaw(sreds
strawberry(RR(RR (RR(t__doc__tosR?ttest_allRRRRRRR,R0tTestCaseRRD(((s*/sys/lib/python2.7/bsddb/test/test_join.pyt<module>s$. >
|