[Zodb-checkins] CVS: StandaloneZODB/BTrees/tests - testBTrees.py:1.22.20.2 testConflict.py:1.9.20.2

Jeremy Hylton jeremy@zope.com
Mon, 17 Dec 2001 15:28:36 -0500


Update of /cvs-repository/StandaloneZODB/BTrees/tests
In directory cvs.zope.org:/tmp/cvs-serv4155

Modified Files:
      Tag: StandaloneZODB-1_0-branch
	testBTrees.py testConflict.py 
Log Message:
Merge BTreeFSIndex-branch into StandaloneZODB-1_0-branch


=== StandaloneZODB/BTrees/tests/testBTrees.py 1.22.20.1 => 1.22.20.2 ===
             t = self.t.__class__()
             self._populate(t, i)
+            root = None
             try:
                 root = self._getRoot()
                 root[i] = t
                 get_transaction().commit()
             except:
-                self._closeDB(root)
+                if root is not None:
+                    self._closeDB(root)
                 self._delDB()
                 raise
 
@@ -732,8 +734,6 @@
 
     return alltests
 
-
-
 ## utility functions
 
 def lsubtract(l1, l2):
@@ -746,10 +746,8 @@
 def realseq(itemsob):
     return map(lambda x: x, itemsob)
 
-
 def main():
     TextTestRunner().run(test_suite())
 
 if __name__ == '__main__':
     main()
-


=== StandaloneZODB/BTrees/tests/testConflict.py 1.9.20.1 => 1.9.20.2 ===
 
     def _delDB(self):
-        os.system('rm fs_tmp__*')
+        for fn in glob('rm fs_tmp__*'):
+            os.remove(fn)
 
 class MappingBase(Base):
     """ Tests common to mappings (buckets, btrees) """