[Python-checkins] python/dist/src/Lib/test test_dumbdbm.py,1.9,1.10
tim_one@users.sourceforge.net
tim_one@users.sourceforge.net
Sun, 13 Jul 2003 10:21:12 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv24717/Lib/test
Modified Files:
test_dumbdbm.py
Log Message:
Make close() identical to __del__() for a dumbdbm database. Make
closing idempotent (it used to raise a nuisance exception on the 2nd
close attempt).
Bugfix candidate? Probably, but arguable.
Index: test_dumbdbm.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_dumbdbm.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** test_dumbdbm.py 11 Jul 2003 04:09:09 -0000 1.9
--- test_dumbdbm.py 13 Jul 2003 17:21:10 -0000 1.10
***************
*** 39,42 ****
--- 39,49 ----
f.close()
+ def test_close_twice(self):
+ f = dumbdbm.open(_fname)
+ f['a'] = 'b'
+ self.assertEqual(f['a'], 'b')
+ f.close()
+ f.close()
+
def test_dumbdbm_modification(self):
self.init_db()