[server test] can't use skipTest method as a class method, raise appropriate exception instead stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 13 Jan 2011 14:03:50 +0100
branchstable
changeset 6818 5fa425574548
parent 6817 1959d97ebf2e
child 6821 945fce560757
[server test] can't use skipTest method as a class method, raise appropriate exception instead
devtools/repotest.py
server/test/unittest_fti.py
--- a/devtools/repotest.py	Thu Jan 13 13:38:49 2011 +0100
+++ b/devtools/repotest.py	Thu Jan 13 14:03:50 2011 +0100
@@ -26,6 +26,7 @@
 from pprint import pprint
 
 from logilab.common.decorators import clear_cache
+from logilab.common.testlib import SkipTest
 
 def tuplify(list):
     for i in range(len(list)):
@@ -156,7 +157,7 @@
             try:
                 cls.dbhelper = get_db_helper(cls.backend)
             except ImportError, ex:
-                cls.skipTest(str(ex))
+                raise SkipTest(str(ex))
 
     def setUp(self):
         self.repo = FakeRepo(self.schema)
--- a/server/test/unittest_fti.py	Thu Jan 13 13:38:49 2011 +0100
+++ b/server/test/unittest_fti.py	Thu Jan 13 14:03:50 2011 +0100
@@ -2,6 +2,8 @@
 
 import socket
 
+from logilab.common.testlib import SkipTest
+
 from cubicweb.devtools import ApptestConfiguration
 from cubicweb.devtools.testlib import CubicWebTC
 from cubicweb.selectors import is_instance
@@ -9,8 +11,6 @@
 
 AT_LOGILAB = socket.gethostname().endswith('.logilab.fr')
 
-from logilab.common.testlib import SkipTest
-
 
 class PostgresFTITC(CubicWebTC):
     config = ApptestConfiguration('data', sourcefile='sources_fti')