[Checkins] SVN: Products.ZCatalog/trunk/src/Products/ZCatalog/tests/test_catalog.py Cut down test time by using fewer objects in random search tests

Hano Schlichting cvs-admin at zope.org
Sun Mar 25 10:56:03 UTC 2012


Log message for revision 124717:
  Cut down test time by using fewer objects in random search tests
  

Changed:
  U   Products.ZCatalog/trunk/src/Products/ZCatalog/tests/test_catalog.py

-=-
Modified: Products.ZCatalog/trunk/src/Products/ZCatalog/tests/test_catalog.py
===================================================================
--- Products.ZCatalog/trunk/src/Products/ZCatalog/tests/test_catalog.py	2012-03-25 05:15:14 UTC (rev 124716)
+++ Products.ZCatalog/trunk/src/Products/ZCatalog/tests/test_catalog.py	2012-03-25 10:55:59 UTC (rev 124717)
@@ -510,16 +510,16 @@
         self._catalog.addIndex('number', index)
         self._catalog.addColumn('number')
 
-        for i in range(5000):
-            obj = objRS(random.randrange(0, 20000))
+        for i in range(50):
+            obj = objRS(random.randrange(0, 200))
             self._catalog.catalogObject(obj, i)
 
-        self._catalog = self._catalog.__of__(objRS(200))
+        self._catalog = self._catalog.__of__(objRS(20))
 
     def testRangeSearch(self):
-        for i in range(1000):
-            m = random.randrange(0, 20000)
-            n = m + 1000
+        for i in range(10):
+            m = random.randrange(0, 200)
+            n = m + 10
 
             for r in self._catalog.searchResults(
                 number={'query': (m, n), 'range': 'min:max'}):



More information about the checkins mailing list