[Zope-Checkins] CVS: StandaloneZODB/BTrees/tests - testBTrees.py:

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
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 => ===
             t = self.t.__class__()
             self._populate(t, i)
+            root = None
                 root = self._getRoot()
                 root[i] = t
-                self._closeDB(root)
+                if root is not None:
+                    self._closeDB(root)