2 """Test script for the bsddb C module
9 from test_support
import verbose
11 def test(openmethod
, what
):
14 print '\nTesting: ', what
16 fname
= tempfile
.mktemp()
17 f
= openmethod(fname
, 'c')
27 print '%s %s %s' % (f
['a'], f
['b'], f
['c'])
31 print 'key ordering...'
32 f
.set_location(f
.first()[0])
38 print 'Error, last <> last!'
43 if not f
.has_key('a'):
44 print 'Error, missing key!'
49 print 'modification...'
50 f
= openmethod(fname
, 'w')
66 types
= [(bsddb
.btopen
, 'BTree'),
67 (bsddb
.hashopen
, 'Hash Table'),
68 # (bsddb.rnopen,'Record Numbers'), 'put' for RECNO for bsddb 1.85
69 # appears broken... at least on
70 # Solaris Intel - rmasse 1/97
74 test(type[0], type[1])