devtools/repotest.py
changeset 9831 db4aeba5d336
parent 9468 39b7a91a3f4c
child 9833 1485aab7ece6
--- a/devtools/repotest.py	Tue Jul 01 17:25:25 2014 +0200
+++ b/devtools/repotest.py	Tue Jun 10 13:56:24 2014 +0200
@@ -275,6 +275,15 @@
         self.session.commit()
         self.session.set_cnxset()
 
+    def qexecute(self, rql, args=None, build_descr=True):
+        with self.session.new_cnx() as cnx:
+            with cnx.ensure_cnx_set:
+                try:
+                    return self.o.execute(cnx, rql, args, build_descr)
+                finally:
+                    if rql.startswith(('INSERT', 'DELETE', 'SET')):
+                        cnx.commit()
+
 
 class BasePlannerTC(BaseQuerierTC):