Unittest - Add mechanism to skip task and taskd tests

* When testing multiple clients vs server versions, repeating client
tests is unnecessary. By setting the env variables TASKW_SKIP and
TASKD_SKIP it will now be possible to skip all task (client only) and
taskd (client + server) tests, respectively.
This commit is contained in:
Renato Alves 2014-07-18 13:33:51 +01:00
parent 72e8a73ae0
commit 2a198d59fe
4 changed files with 25 additions and 5 deletions

View file

@ -8,7 +8,7 @@ from datetime import datetime
# Ensure python finds the local simpletap module
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from basetest import Task, Taskd, TestCase
from basetest import Task, TestCase, Taskd, ServerTestCase
class TestBugNumber(TestCase):
@ -53,8 +53,7 @@ class TestBugNumber(TestCase):
"""Executed once after all tests in the class"""
@unittest.skipIf(Taskd.not_available(), "Taskd binary not available")
class ServerTestCase(TestCase):
class ServerTestBugNumber(ServerTestCase):
@classmethod
def setUpClass(cls):
cls.taskd = Taskd()