{\rtf1\ansi\ansicpg1252\cocoartf2638
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fnil\fcharset0 Menlo-Regular;}
{\colortbl;\red255\green255\blue255;\red89\green138\blue67;\red23\green23\blue23;\red202\green202\blue202;
\red183\green111\blue179;\red67\green192\blue160;\red70\green137\blue204;\red140\green211\blue254;\red194\green126\blue101;
\red167\green197\blue152;\red212\green214\blue154;}
{\*\expandedcolortbl;;\cssrgb\c41569\c60000\c33333;\cssrgb\c11765\c11765\c11765;\cssrgb\c83137\c83137\c83137;
\cssrgb\c77255\c52549\c75294;\cssrgb\c30588\c78824\c69020;\cssrgb\c33725\c61176\c83922;\cssrgb\c61176\c86275\c99608;\cssrgb\c80784\c56863\c47059;
\cssrgb\c70980\c80784\c65882;\cssrgb\c86275\c86275\c66667;}
\paperw11900\paperh16840\margl1440\margr1440\vieww11520\viewh8400\viewkind0
\deftab720
\pard\pardeftab720\partightenfactor0

\f0\fs24 \cf2 \cb3 \expnd0\expndtw0\kerning0
\outl0\strokewidth0 \strokec2 #!/usr/bin/env python\cf4 \cb1 \strokec4 \
\
\pard\pardeftab720\partightenfactor0
\cf5 \cb3 \strokec5 import\cf4 \strokec4  \cf6 \strokec6 wttest\cf4 \cb1 \strokec4 \
\
\pard\pardeftab720\partightenfactor0
\cf2 \cb3 \strokec2 # test_cache01.py\cf4 \cb1 \strokec4 \
\cf2 \cb3 \strokec2 # Check if we can commit transactions that del with data larger than the cache size.\cf4 \cb1 \strokec4 \
\pard\pardeftab720\partightenfactor0
\cf7 \cb3 \strokec7 class\cf4 \strokec4  \cf6 \strokec6 test_cache01\cf4 \strokec4 (\cf6 \strokec6 wttest\cf4 \strokec4 .\cf6 \strokec6 WiredTigerTestCase\cf4 \strokec4 ):\cb1 \
\pard\pardeftab720\partightenfactor0
\cf4 \cb3     \cf8 \strokec8 conn_config\cf4 \strokec4 =\cf9 \strokec9 'cache_size=1MB'\cf4 \cb1 \strokec4 \
\cb3     \cf8 \strokec8 uri\cf4 \strokec4 =\cf9 \strokec9 "table:test"\cf4 \cb1 \strokec4 \
\cb3     \cf8 \strokec8 nrows\cf4 \strokec4  = \cf10 \strokec10 1000\cf4 \cb1 \strokec4 \
\cb3     \cf8 \strokec8 factor\cf4 \strokec4  = \cf10 \strokec10 100000\cf4 \cb1 \strokec4 \
\
\cb3     \cf7 \strokec7 def\cf4 \strokec4  \cf11 \strokec11 test_cache01\cf4 \strokec4 (\cf8 \strokec8 self\cf4 \strokec4 ):\cb1 \
\
\cb3         \cf8 \strokec8 self\cf4 \strokec4 .\cf8 \strokec8 session\cf4 \strokec4 .create(\cf8 \strokec8 self\cf4 \strokec4 .\cf8 \strokec8 uri\cf4 \strokec4 , \cf9 \strokec9 "key_format=S,value_format=S"\cf4 \strokec4 )\cb1 \
\cb3         \cf8 \strokec8 cursor\cf4 \strokec4  = \cf8 \strokec8 self\cf4 \strokec4 .\cf8 \strokec8 session\cf4 \strokec4 .open_cursor(\cf8 \strokec8 self\cf4 \strokec4 .\cf8 \strokec8 uri\cf4 \strokec4 )\cb1 \
\
\cb3         \cf5 \strokec5 for\cf4 \strokec4  \cf8 \strokec8 i\cf4 \strokec4  \cf5 \strokec5 in\cf4 \strokec4  \cf6 \strokec6 range\cf4 \strokec4 (\cf10 \strokec10 1\cf4 \strokec4 , \cf8 \strokec8 self\cf4 \strokec4 .\cf8 \strokec8 nrows\cf4 \strokec4 ):\cb1 \
\cb3             \cf8 \strokec8 v\cf4 \strokec4  = \cf6 \strokec6 str\cf4 \strokec4 (\cf8 \strokec8 i\cf4 \strokec4 ) * \cf8 \strokec8 self\cf4 \strokec4 .\cf8 \strokec8 factor\cf4 \cb1 \strokec4 \
\cb3             \cf8 \strokec8 cursor\cf4 \strokec4 .set_key(\cf8 \strokec8 v\cf4 \strokec4 )\cb1 \
\cb3             \cf8 \strokec8 cursor\cf4 \strokec4 .set_value(\cf8 \strokec8 v\cf4 \strokec4 )\cb1 \
\cb3             \cf8 \strokec8 self\cf4 \strokec4 .assertEqual(\cf8 \strokec8 cursor\cf4 \strokec4 .insert(), \cf10 \strokec10 0\cf4 \strokec4 )\cb1 \
\cb3         \cb1 \
\cb3         \cf5 \strokec5 for\cf4 \strokec4  \cf8 \strokec8 i\cf4 \strokec4  \cf5 \strokec5 in\cf4 \strokec4  \cf6 \strokec6 range\cf4 \strokec4 (\cf10 \strokec10 1\cf4 \strokec4 , \cf8 \strokec8 self\cf4 \strokec4 .\cf8 \strokec8 nrows\cf4 \strokec4 ):\cb1 \
\cb3             \cf8 \strokec8 v\cf4 \strokec4  = \cf6 \strokec6 str\cf4 \strokec4 (\cf8 \strokec8 i\cf4 \strokec4 ) * \cf8 \strokec8 self\cf4 \strokec4 .\cf8 \strokec8 factor\cf4 \cb1 \strokec4 \
\cb3             \cf8 \strokec8 cursor\cf4 \strokec4 .set_key(\cf8 \strokec8 v\cf4 \strokec4 )\cb1 \
\cb3             \cf8 \strokec8 self\cf4 \strokec4 .assertEqual(\cf8 \strokec8 cursor\cf4 \strokec4 .search(), \cf10 \strokec10 0\cf4 \strokec4 )\cb1 \
\cb3             \cf8 \strokec8 self\cf4 \strokec4 .assertEqual(\cf8 \strokec8 cursor\cf4 \strokec4 .get_value(), \cf8 \strokec8 v\cf4 \strokec4 )\cb1 \
\
\pard\pardeftab720\partightenfactor0
\cf5 \cb3 \strokec5 if\cf4 \strokec4  \cf8 \strokec8 __name__\cf4 \strokec4  == \cf9 \strokec9 '__main__'\cf4 \strokec4 :\cb1 \
\pard\pardeftab720\partightenfactor0
\cf4 \cb3     \cf6 \strokec6 wttest\cf4 \strokec4 .\cf11 \strokec11 run\cf4 \strokec4 ()\cb1 \
\
}