devtools/testlib.py
branchtls-sprint
changeset 1775 f450f1594992
parent 1773 789ee507a8e0
child 1977 606923dff11b
--- a/devtools/testlib.py	Wed May 13 10:12:40 2009 +0200
+++ b/devtools/testlib.py	Wed May 13 11:01:40 2009 +0200
@@ -249,9 +249,11 @@
         etypes = self.to_test_etypes()
         for etype in etypes:
             yield self.execute('Any X LIMIT %s WHERE X is %s' % (limit, etype))
-
         etype1 = etypes.pop()
-        etype2 = etypes.pop()
+        try:
+            etype2 = etypes.pop()
+        except KeyError:
+            etype2 = etype1
         # test a mixed query (DISTINCT/GROUP to avoid getting duplicate
         # X which make muledit view failing for instance (html validation fails
         # because of some duplicate "id" attributes)