devtools/testlib.py
changeset 1004 625e59773119
parent 563 a690996639ca
child 1006 92a0601b2523
--- a/devtools/testlib.py	Wed Mar 04 13:25:51 2009 +0100
+++ b/devtools/testlib.py	Wed Mar 04 16:53:10 2009 +0100
@@ -256,11 +256,11 @@
     def to_test_etypes(self):
         return unprotected_entities(self.schema, strict=True)
     
-    def iter_automatic_rsets(self):
+    def iter_automatic_rsets(self, limit=10):
         """generates basic resultsets for each entity type"""
         etypes = self.to_test_etypes()
         for etype in etypes:
-            yield self.execute('Any X WHERE X is %s' % etype)
+            yield self.execute('Any X LIMIT %s WHERE X is %s' % (limit, etype))
 
         etype1 = etypes.pop()
         etype2 = etypes.pop()
@@ -355,14 +355,14 @@
     ## one each
     def test_one_each_config(self):
         self.auto_populate(1)
-        for rset in self.iter_automatic_rsets():
+        for rset in self.iter_automatic_rsets(limit=1):
             for testargs in self._test_everything_for(rset):
                 yield testargs
 
     ## ten each
     def test_ten_each_config(self):
         self.auto_populate(10)
-        for rset in self.iter_automatic_rsets():
+        for rset in self.iter_automatic_rsets(limit=10):
             for testargs in self._test_everything_for(rset):
                 yield testargs