[Zodb-checkins] CVS: StandaloneZODB/BTrees/tests - testBTrees.py:1.14.36.5.6.1
Jeremy Hylton
jeremy@zope.com
Mon, 3 Dec 2001 16:31:39 -0500
Update of /cvs-repository/StandaloneZODB/BTrees/tests
In directory cvs.zope.org:/tmp/cvs-serv15391/BTrees/tests
Modified Files:
Tag: BTreeFSIndex-branch
testBTrees.py
Log Message:
Many small changes, mostly cosmetic.
One interface change: Allow import error on _fsBTree to percolate.
One non-functional, performance fix: values() now iterates over only
the values() of the btrees and not the items().
Reformat code according to guidelines from the Society for the
Promotion of Whitespace (SPOW).
Use local str2num() and num2str() functions instead of p64() and U64()
+ slice.
Replace negative slices with positive slices. I find it much easier
to read key[:6] than key[:-2].
Use default as default value in get() implementation.
=== StandaloneZODB/BTrees/tests/testBTrees.py 1.14.36.5 => 1.14.36.5.6.1 ===
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