can't raise SkipTest in unittest2 setUp stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 25 Jan 2011 10:08:45 +0100
branchstable
changeset 611 57b59294d79e
parent 609 257a78538ff2
child 612 2e60c6578324
child 613 213f8fff2aee
can't raise SkipTest in unittest2 setUp
test/unittest_compare.py
--- a/test/unittest_compare.py	Thu Jan 13 21:27:20 2011 +0100
+++ b/test/unittest_compare.py	Tue Jan 25 10:08:45 2011 +0100
@@ -15,7 +15,7 @@
 #
 # You should have received a copy of the GNU Lesser General Public License along
 # with rql. If not, see <http://www.gnu.org/licenses/>.
-from logilab.common.testlib import TestCase, unittest_main
+from logilab.common.testlib import TestCase, SkipTest, unittest_main
 
 from rql import RQLHelper
 from unittest_analyze import RelationSchema, EntitySchema, DummySchema as BaseSchema
@@ -36,10 +36,12 @@
 
 class RQLCompareClassTest(TestCase):
     """ Compare RQL strings """
+    @classmethod
+    def setUpClass(cls):
+        raise SkipTest('broken')
 
     def setUp(self):
         self.h = RQLHelper(DummySchema(), None)
-        self.skipTest('broken')
 
     def _compareEquivalent(self,r1,r2):
         """fails if the RQL strings r1 and r2 are equivalent"""