summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_bsddb.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-03-22 00:40:23 (GMT)
committerGuido van Rossum <guido@python.org>2001-03-22 00:40:23 (GMT)
commitf6e47ad4bd12ffa633d51071520722be32fb252d (patch)
treec1b1a25d0c2e809102b9010d437879f4afaef65d /Lib/test/test_bsddb.py
parent4edbc2a54ff79e718fb3d30da5c128fc8b46ccc0 (diff)
downloadcpython-f6e47ad4bd12ffa633d51071520722be32fb252d.zip
cpython-f6e47ad4bd12ffa633d51071520722be32fb252d.tar.gz
cpython-f6e47ad4bd12ffa633d51071520722be32fb252d.tar.bz2
Check that f.keys() == [] right after creation -- this prevents bugs
like the one I just fixed to come back and haunt us.
Diffstat (limited to 'Lib/test/test_bsddb.py')
-rwxr-xr-xLib/test/test_bsddb.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_bsddb.py b/Lib/test/test_bsddb.py
index b59a4e0..192c6e2 100755
--- a/Lib/test/test_bsddb.py
+++ b/Lib/test/test_bsddb.py
@@ -6,7 +6,7 @@
import os
import bsddb
import tempfile
-from test_support import verbose
+from test_support import verbose, verify
def test(openmethod, what):
@@ -15,6 +15,7 @@ def test(openmethod, what):
fname = tempfile.mktemp()
f = openmethod(fname, 'c')
+ verify(f.keys() == [])
if verbose:
print 'creation...'
f['0'] = ''