mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-20 13:23:08 +02:00
Test: Cleaned up broken test
This commit is contained in:
parent
184fde0f5f
commit
0572db902d
1 changed files with 23 additions and 23 deletions
|
@ -54,16 +54,16 @@ class TestAnnotate(TestCase):
|
||||||
#
|
#
|
||||||
# 4 tasks
|
# 4 tasks
|
||||||
|
|
||||||
self.t(("add", "one"))
|
self.t("add one")
|
||||||
self.t(("add", "two"))
|
self.t("add two")
|
||||||
self.t(("add", "three"))
|
self.t("add three")
|
||||||
self.t(("add", "four"))
|
self.t("add four")
|
||||||
self.t(("1", "annotate", "foo1"))
|
self.t("1 annotate foo1")
|
||||||
self.t(("1", "annotate", "foo2"))
|
self.t("1 annotate foo2")
|
||||||
self.t(("1", "annotate", "foo3"))
|
self.t("1 annotate foo3")
|
||||||
self.t(("2", "annotate", "bar1"))
|
self.t("2 annotate bar1")
|
||||||
self.t(("2", "annotate", "bar2"))
|
self.t("2 annotate bar2")
|
||||||
self.t(("3", "annotate", "baz1"))
|
self.t("3 annotate baz1")
|
||||||
|
|
||||||
def assertTasksExist(self, out):
|
def assertTasksExist(self, out):
|
||||||
self.assertIn("1 one", out)
|
self.assertIn("1 one", out)
|
||||||
|
@ -78,12 +78,12 @@ class TestAnnotate(TestCase):
|
||||||
# NOTE: Use 'rrr' to guarantee a unique report name. Using 'r'
|
# NOTE: Use 'rrr' to guarantee a unique report name. Using 'r'
|
||||||
# conflicts with 'recurring'.
|
# conflicts with 'recurring'.
|
||||||
self.t.config("report.rrr.description", "rrr")
|
self.t.config("report.rrr.description", "rrr")
|
||||||
self.t.config("report.rrr.columns", "id,description")
|
self.t.config("report.rrr.columns", "id,description")
|
||||||
self.t.config("report.rrr.sort", "id+")
|
self.t.config("report.rrr.sort", "id+")
|
||||||
self.t.config("dateformat", "m/d/Y")
|
self.t.config("dateformat", "m/d/Y")
|
||||||
self.t.config("color", "off")
|
self.t.config("color", "off")
|
||||||
|
|
||||||
code, out, err = self.t(("rrr",))
|
code, out, err = self.t("rrr")
|
||||||
|
|
||||||
self.assertTasksExist(out)
|
self.assertTasksExist(out)
|
||||||
|
|
||||||
|
@ -106,11 +106,11 @@ class TestAnnotate(TestCase):
|
||||||
# NOTE: Use 'rrr' to guarantee a unique report name. Using 'r'
|
# NOTE: Use 'rrr' to guarantee a unique report name. Using 'r'
|
||||||
# conflicts with 'recurring'.
|
# conflicts with 'recurring'.
|
||||||
self.t.config("report.rrr.description", "rrr")
|
self.t.config("report.rrr.description", "rrr")
|
||||||
self.t.config("report.rrr.columns", "id,description")
|
self.t.config("report.rrr.columns", "id,description")
|
||||||
self.t.config("report.rrr.sort", "id+")
|
self.t.config("report.rrr.sort", "id+")
|
||||||
self.t.config("dateformat.annotation", "yMD HNS")
|
self.t.config("dateformat.annotation", "yMD HNS")
|
||||||
|
|
||||||
code, out, err = self.t(("rrr",))
|
code, out, err = self.t("rrr")
|
||||||
|
|
||||||
self.assertTasksExist(out)
|
self.assertTasksExist(out)
|
||||||
|
|
||||||
|
@ -135,12 +135,12 @@ class TestBug495(TestCase):
|
||||||
def test_double_hyphen_annotation(self):
|
def test_double_hyphen_annotation(self):
|
||||||
"""double hyphen mishandled for annotations"""
|
"""double hyphen mishandled for annotations"""
|
||||||
# NOTE: originally Bug #495
|
# NOTE: originally Bug #495
|
||||||
self.t(("add", "foo"))
|
self.t("add foo")
|
||||||
self.t(("1", "annotate", "This -- is -- a -- test"))
|
self.t("1 annotate This -- is -- a -- test")
|
||||||
|
|
||||||
code, out, err = self.t(("long",))
|
|
||||||
# Double hyphens preserved except the first ones
|
# Double hyphens preserved except the first ones
|
||||||
self.assertIn("This is -- a -- test", out)
|
code, out, err = self.t("_get 1.annotations.1.description")
|
||||||
|
self.assertEqual("This is -- a -- test\n", out)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue