[Python-checkins] CVS: python/dist/src/Lib/test test_bsddb.py,1.7,1.8

Guido van Rossum gvanrossum@users.sourceforge.net
Wed, 21 Mar 2001 16:38:43 -0800


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv15908

Modified Files:
	test_bsddb.py 
Log Message:
Check that f.keys() == [] right after creation -- this prevents bugs
like the one I just fixed to come back and haunt us.


Index: test_bsddb.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_bsddb.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** test_bsddb.py	2001/01/17 21:51:36	1.7
--- test_bsddb.py	2001/03/22 00:38:40	1.8
***************
*** 7,11 ****
  import bsddb
  import tempfile
! from test_support import verbose
  
  def test(openmethod, what):
--- 7,11 ----
  import bsddb
  import tempfile
! from test_support import verbose, verify
  
  def test(openmethod, what):
***************
*** 16,19 ****
--- 16,20 ----
      fname = tempfile.mktemp()
      f = openmethod(fname, 'c')
+     verify(f.keys() == [])
      if verbose:
          print 'creation...'