summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_bsddb.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-03-26 19:42:58 (GMT)
committerGuido van Rossum <guido@python.org>1998-03-26 19:42:58 (GMT)
commit41360a4696f488e49e5409b3b1baf1fff6ae0044 (patch)
tree9c9b73b7446cc9fc36e09038bf26d889bb5b6f24 /Lib/test/test_bsddb.py
parentcd0f59ea0824ad6f897f05c2db4d4471e47e6063 (diff)
downloadcpython-41360a4696f488e49e5409b3b1baf1fff6ae0044.zip
cpython-41360a4696f488e49e5409b3b1baf1fff6ae0044.tar.gz
cpython-41360a4696f488e49e5409b3b1baf1fff6ae0044.tar.bz2
Mass check-in after untabifying all files that need it.
Diffstat (limited to 'Lib/test/test_bsddb.py')
-rwxr-xr-xLib/test/test_bsddb.py56
1 files changed, 28 insertions, 28 deletions
diff --git a/Lib/test/test_bsddb.py b/Lib/test/test_bsddb.py
index 7a95eb9..1188e06 100755
--- a/Lib/test/test_bsddb.py
+++ b/Lib/test/test_bsddb.py
@@ -9,12 +9,12 @@ from test_support import verbose
def test(openmethod, what):
if verbose:
- print '\nTesting: ', what
-
+ print '\nTesting: ', what
+
fname = tempfile.mktemp()
f = openmethod(fname, 'c')
if verbose:
- print 'creation...'
+ print 'creation...'
f['0'] = ''
f['a'] = 'Guido'
f['b'] = 'van'
@@ -22,47 +22,47 @@ def test(openmethod, what):
f['d'] = 'invented'
f['f'] = 'Python'
if verbose:
- print '%s %s %s' % (f['a'], f['b'], f['c'])
+ print '%s %s %s' % (f['a'], f['b'], f['c'])
if what == 'BTree' :
- if verbose:
- print 'key ordering...'
- f.set_location(f.first()[0])
- while 1:
- try:
- rec = f.next()
- except KeyError:
- if rec <> f.last():
- print 'Error, last <> last!'
- f.previous()
- break
- if verbose:
- print rec
- if not f.has_key('a'):
- print 'Error, missing key!'
+ if verbose:
+ print 'key ordering...'
+ f.set_location(f.first()[0])
+ while 1:
+ try:
+ rec = f.next()
+ except KeyError:
+ if rec <> f.last():
+ print 'Error, last <> last!'
+ f.previous()
+ break
+ if verbose:
+ print rec
+ if not f.has_key('a'):
+ print 'Error, missing key!'
f.sync()
f.close()
if verbose:
- print 'modification...'
+ print 'modification...'
f = openmethod(fname, 'w')
f['d'] = 'discovered'
if verbose:
- print 'access...'
+ print 'access...'
for key in f.keys():
- word = f[key]
- if verbose:
- print word
+ word = f[key]
+ if verbose:
+ print word
f.close()
types = [(bsddb.btopen, 'BTree'),
- (bsddb.hashopen, 'Hash Table'),
- # (bsddb.rnopen,'Record Numbers'), 'put' for RECNO for bsddb 1.85
+ (bsddb.hashopen, 'Hash Table'),
+ # (bsddb.rnopen,'Record Numbers'), 'put' for RECNO for bsddb 1.85
# appears broken... at least on
- # Solaris Intel - rmasse 1/97
- ]
+ # Solaris Intel - rmasse 1/97
+ ]
for type in types:
test(type[0], type[1])