mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-19 09:53:08 +02:00
Test: Change most tests to use "add test" instead of split arguments
This commit is contained in:
parent
d711bda35c
commit
27b8cabac1
76 changed files with 1179 additions and 1245 deletions
14
test/wait.t
14
test/wait.t
|
@ -49,16 +49,16 @@ class TestWait(TestCase):
|
|||
# [1] an hour before current time (visible 'now')
|
||||
# [2] 22 hours after current time (hidden 'now', visible 'tomorrow')
|
||||
self.t.faketime("-2h")
|
||||
self.t(("add", "wait:1h", "visible"))
|
||||
self.t(("add", "wait:1d", "hidden"))
|
||||
self.t("add wait:1h visible")
|
||||
self.t("add wait:1d hidden")
|
||||
|
||||
self.t.faketime()
|
||||
code, out, err = self.t(("ls",))
|
||||
code, out, err = self.t("ls")
|
||||
self.assertIn("visible", out)
|
||||
self.assertNotIn("hidden", out)
|
||||
|
||||
self.t.faketime("+1d")
|
||||
code, out, err = self.t(("ls",))
|
||||
code, out, err = self.t("ls")
|
||||
self.assertIn("visible", out)
|
||||
self.assertIn("hidden", out)
|
||||
|
||||
|
@ -71,12 +71,12 @@ class TestBug434(TestCase):
|
|||
|
||||
def test_complete_waiting(self):
|
||||
"""completion of waiting tasks"""
|
||||
self.t(("add", "One", "wait:tomorrow"))
|
||||
self.t("add One wait:tomorrow")
|
||||
|
||||
code, out, err = self.t(("1", "done"))
|
||||
code, out, err = self.t("1 done")
|
||||
self.assertIn("Completed 1 task", out)
|
||||
|
||||
code, out, err = self.t.runError(("ls",))
|
||||
code, out, err = self.t.runError("ls")
|
||||
self.assertNotIn("One", out)
|
||||
self.assertIn("No matches", err)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue