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

Andreas Jung andreas@zope.com
Tue, 4 Sep 2001 09:22:01 -0400


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

Modified Files:
	testBTrees.py 
Log Message:
test for XXBucket.values() did not detect broken values()
implementation


=== Zope/lib/python/BTrees/tests/testBTrees.py 1.19 => 1.20 ===
     def testValuesWorks(self):
         for x in range(100):
-            self.t[x] = x
+            self.t[x] = x*x
         v = self.t.values()
-        i = 0
-        for x in v:
-            assert x == i, (x,i)
-            i = i + 1
+        for i in range(100):
+            assert v[i]==i*i , (i*i,i)
+
             
     def testKeysWorks(self):
         for x in range(100):