fix in case only one type is tested tls-sprint
authorsylvain.thenault@logilab.fr
Wed, 13 May 2009 11:01:40 +0200
branchtls-sprint
changeset 1775 f450f1594992
parent 1774 4f4e0c6682e5
child 1778 311026c9073a
fix in case only one type is tested
devtools/testlib.py
--- 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)