[Zodb-checkins] CVS: Zope/lib/python/BTrees/tests - testBTrees.py:1.24

Andreas Jung andreas@zope.com
Thu, 20 Dec 2001 15:37:43 -0500


Update of /cvs-repository/Zope/lib/python/BTrees/tests
In directory cvs.zope.org:/tmp/cvs-serv26413/tests

Modified Files:
	testBTrees.py 
Log Message:
added check for keys() called with arguments


=== Zope/lib/python/BTrees/tests/testBTrees.py 1.23 => 1.24 ===
             assert v[i]==i*i , (i*i,i)
 
+
             
     def testKeysWorks(self):
         for x in range(100):
@@ -153,8 +154,13 @@
         v = self.t.keys()
         i = 0
         for x in v:
-            assert x == i, (x,i)
+            self.assertEqual(x,i)
             i = i + 1
+
+        for x in range(40):
+            lst = self.t.keys(0+x,99-x)
+            self.assertEqual(list(lst),range(0+x,99-x+1))
+
         # BTree items must lie about their lengths, so we convert to list
         assert len(v) == 100, len(v)
         #assert len(v) == 100, len(v)