[Zope-CVS] CVS: Products/ZCTextIndex/tests - testNBest.py:1.1.2.2

Tim Peters tim.one@comcast.net
Wed, 1 May 2002 17:15:06 -0400


Update of /cvs-repository/Products/ZCTextIndex/tests
In directory cvs.zope.org:/tmp/cvs-serv12809/tests

Modified Files:
      Tag: TextIndexDS9-branch
	testNBest.py 
Log Message:
testMany():  make the items and score different, and in opposite senses,
so this test can't pass by accident.


=== Products/ZCTextIndex/tests/testNBest.py 1.1.2.1 => 1.1.2.2 ===
         import random
         n = 10
-        inputs = []
-        for i in range(50):
-            inputs.append((i, i))
+        inputs = [(-i, i) for i in range(50)]
         expected = inputs[-n:]
         expected.reverse()
 
@@ -59,7 +57,7 @@
         self.assertEqual(nb.capacity(), n)
         self.assertEqual(nb.getbest(), expected)
 
-        # Feed them in in decreading order.
+        # Feed them in in decreasing order.
         nb = NBest(n)
         inputs.reverse()
         for item, score in inputs: