[test] skip test when dbhelper has no underlying dbapi module available stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 08 Oct 2010 09:43:24 +0200
branchstable
changeset 6414 6003dc203567
parent 6412 370357e68837
child 6419 6aa0bb1c42e2
[test] skip test when dbhelper has no underlying dbapi module available
devtools/repotest.py
--- a/devtools/repotest.py	Fri Oct 08 07:48:37 2010 +0200
+++ b/devtools/repotest.py	Fri Oct 08 09:43:24 2010 +0200
@@ -158,7 +158,10 @@
         ExecutionPlan._check_permissions = _dummy_check_permissions
         rqlannotation._select_principal = _select_principal
         if self.backend is not None:
-            dbhelper = get_db_helper(self.backend)
+            try:
+                dbhelper = get_db_helper(self.backend)
+            except ImportError, ex:
+                self.skipTest(str(ex))
             self.o = SQLGenerator(self.schema, dbhelper)
 
     def tearDown(self):