taskwarrior/test/basetest/testing.py
Renato Alves c3423243d8 Tests: Rename self.diag to self.tap and use self.t.diag where applicable
Having self.diag and self.t.diag was confusing as one referred to TAP
output (self.diag) while the other referred to "task diagnostics"
self.t.diag.

self.diag is now gone and was replaced by self.tap with the same
behavior.
2015-06-10 23:33:56 +01:00

33 lines
945 B
Python

# -*- coding: utf-8 -*-
import unittest
import sys
from .utils import TASKW_SKIP, TASKD_SKIP
from .taskd import Taskd
class BaseTestCase(unittest.TestCase):
def tap(self, out):
sys.stderr.write("--- tap output start ---\n")
for line in out.splitlines():
sys.stderr.write(line + '\n')
sys.stderr.write("--- tap output end ---\n")
@unittest.skipIf(TASKW_SKIP, "TASKW_SKIP set, skipping task tests.")
class TestCase(BaseTestCase):
"""Automatically skips tests if TASKW_SKIP is present in the environment
"""
pass
@unittest.skipIf(TASKD_SKIP, "TASKD_SKIP set, skipping taskd tests.")
@unittest.skipIf(Taskd.not_available(), "Taskd binary not available at '{0}'"
.format(Taskd.DEFAULT_TASKD))
class ServerTestCase(BaseTestCase):
"""Automatically skips tests if TASKD_SKIP is present in the environment
"""
pass
# vim: ai sts=4 et sw=4