[Python-checkins] python/dist/src/Lib/test test_bsddb185.py,1.3,1.4
montanaro@users.sourceforge.net
montanaro@users.sourceforge.net
Fri, 16 May 2003 19:54:13 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv7883
Modified Files:
test_bsddb185.py
Log Message:
simpler temp dir cleanup
Index: test_bsddb185.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_bsddb185.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** test_bsddb185.py 13 May 2003 06:42:59 -0000 1.3
--- test_bsddb185.py 17 May 2003 02:54:11 -0000 1.4
***************
*** 12,15 ****
--- 12,16 ----
import os
import tempfile
+ import shutil
class Bsddb185Tests(unittest.TestCase):
***************
*** 29,41 ****
tmpdir = tempfile.mkdtemp()
try:
! try:
! dbfile = os.path.join(tmpdir, "foo.db")
! anydbm.open(os.path.splitext(dbfile)[0], "c").close()
! ftype = whichdb.whichdb(dbfile)
! self.assertNotEqual(ftype, "bsddb185")
! finally:
! os.unlink(dbfile)
finally:
! os.rmdir(tmpdir)
def test_main():
--- 30,39 ----
tmpdir = tempfile.mkdtemp()
try:
! dbfile = os.path.join(tmpdir, "foo.db")
! anydbm.open(dbfile, "c").close()
! ftype = whichdb.whichdb(dbfile)
! self.assertNotEqual(ftype, "bsddb185")
finally:
! shutil.rmtree(tmpdir)
def test_main():