[test] add default generic test Tags to CubicWeb TestCase class
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Tue, 06 Jul 2010 19:33:59 +0200
changeset 5913 85240b3f9ee4
parent 5912 ff916bf2eba0
child 5914 dc5a77a2e485
[test] add default generic test Tags to CubicWeb TestCase class
devtools/testlib.py
--- a/devtools/testlib.py	Tue Jul 06 19:32:29 2010 +0200
+++ b/devtools/testlib.py	Tue Jul 06 19:33:59 2010 +0200
@@ -31,7 +31,7 @@
 
 import yams.schema
 
-from logilab.common.testlib import TestCase, InnerTest
+from logilab.common.testlib import TestCase, InnerTest, Tags
 from logilab.common.pytest import nocoverage, pause_tracing, resume_tracing
 from logilab.common.debugger import Debugger
 from logilab.common.umessage import message_from_string
@@ -163,6 +163,7 @@
     appid = 'data'
     configcls = devtools.ApptestConfiguration
     reset_schema = reset_vreg = False # reset schema / vreg between tests
+    tags= TestCase.tags | Tags('cubicweb', 'cw_repo')
 
     @classproperty
     def config(cls):
@@ -786,6 +787,8 @@
     """base class for test with auto-populating of the database"""
     __abstract__ = True
 
+    tags = CubicWebTC.tags | Tags('autopopulated')
+
     pdbclass = CubicWebDebugger
     # this is a hook to be able to define a list of rql queries
     # that are application dependent and cannot be guessed automatically
@@ -911,6 +914,9 @@
 
 class AutomaticWebTest(AutoPopulateTest):
     """import this if you wan automatic tests to be ran"""
+
+    tags = AutoPopulateTest.tags | Tags('web', 'generated')
+
     def setUp(self):
         AutoPopulateTest.setUp(self)
         # access to self.app for proper initialization of the authentication