mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Tests: Broke one tests into eight, so it is clear which one fails
This commit is contained in:
parent
9be1494357
commit
d8d5a15321
1 changed files with 27 additions and 22 deletions
|
@ -36,51 +36,56 @@ from basetest import Task, TestCase
|
|||
|
||||
|
||||
class TestUnderline(TestCase):
|
||||
def setUp(self):
|
||||
"""Executed before each test in the class"""
|
||||
self.t = Task()
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
cls.t = Task()
|
||||
cls.t("add foo")
|
||||
|
||||
def test_version(self):
|
||||
"""Verify that underlineѕ table headers are used at the right time"""
|
||||
# Test the fontunderline config variable. The following truth table defines
|
||||
# the different results which are to be confirmed.
|
||||
#
|
||||
# color _forcecolor fontunderline result
|
||||
# ----- ----------- ------------- ---------
|
||||
# 0 0 0 dashes
|
||||
# 0 0 1 dashes
|
||||
# 0 1 0 dashes
|
||||
# 0 1 1 underline
|
||||
# 1* 0 0 dashes
|
||||
# 1* 0 1 dashes
|
||||
# 1* 1 0 dashes
|
||||
# 1* 1 1 underline
|
||||
#
|
||||
# * When isatty (fileno (stdout)) is false, color is automatically disabled.
|
||||
|
||||
# Test the fontunderline config variable. The following truth table defines
|
||||
# the different results which are to be confirmed.
|
||||
#
|
||||
# color _forcecolor fontunderline result
|
||||
# ----- ----------- ------------- ---------
|
||||
# 0 0 0 dashes
|
||||
# 0 0 1 dashes
|
||||
# 0 1 0 dashes
|
||||
# 0 1 1 underline
|
||||
# 1* 0 0 dashes
|
||||
# 1* 0 1 dashes
|
||||
# 1* 1 0 dashes
|
||||
# 1* 1 1 underline
|
||||
#
|
||||
# * When isatty (fileno (stdout)) is false, color is automatically disabled.
|
||||
|
||||
self.t("add foo")
|
||||
def test_nocolor_noforce_nounderline(self):
|
||||
code, out, err = self.t("1 info rc.color:off rc._forcecolor:off rc.fontunderline:off")
|
||||
self.assertIn("--------", out)
|
||||
|
||||
def test_nocolor_noforce_underline(self):
|
||||
code, out, err = self.t("1 info rc.color:off rc._forcecolor:off rc.fontunderline:on")
|
||||
self.assertIn("--------", out)
|
||||
|
||||
def test_nocolor_force_nounderline(self):
|
||||
code, out, err = self.t("1 info rc.color:off rc._forcecolor:on rc.fontunderline:off")
|
||||
self.assertIn("--------", out)
|
||||
|
||||
def test_nocolor_force_underline(self):
|
||||
code, out, err = self.t("1 info rc.color:off rc._forcecolor:on rc.fontunderline:on")
|
||||
self.assertNotIn("--------", out)
|
||||
|
||||
def test_color_noforce_nounderline(self):
|
||||
code, out, err = self.t("1 info rc.color:on rc._forcecolor:off rc.fontunderline:off")
|
||||
self.assertIn("--------", out)
|
||||
|
||||
def test_color_noforce_underline(self):
|
||||
code, out, err = self.t("1 info rc.color:on rc._forcecolor:off rc.fontunderline:on")
|
||||
self.assertIn("--------", out)
|
||||
|
||||
def test_color_force_nounderline(self):
|
||||
code, out, err = self.t("1 info rc.color:on rc._forcecolor:on rc.fontunderline:off")
|
||||
self.assertIn("--------", out)
|
||||
|
||||
def test_color_force_underline(self):
|
||||
code, out, err = self.t("1 info rc.color:on rc._forcecolor:on rc.fontunderline:on")
|
||||
self.assertNotIn("--------", out)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue