protect against empty etypes stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 01 Jul 2009 16:40:35 +0200
branchstable
changeset 2219 bb5098e74b82
parent 2218 b5d00053a7fe
child 2220 64aace08ae2f
protect against empty etypes
devtools/testlib.py
--- a/devtools/testlib.py	Wed Jul 01 16:40:03 2009 +0200
+++ b/devtools/testlib.py	Wed Jul 01 16:40:35 2009 +0200
@@ -245,6 +245,8 @@
     def iter_automatic_rsets(self, limit=10):
         """generates basic resultsets for each entity type"""
         etypes = self.to_test_etypes()
+        if not etypes:
+            return
         for etype in etypes:
             yield self.execute('Any X LIMIT %s WHERE X is %s' % (limit, etype))
         etype1 = etypes.pop()