Test: Change most tests to use "add test" instead of split arguments

This commit is contained in:
Renato Alves
2015-07-17 19:13:26 +01:00
parent d711bda35c
commit 27b8cabac1
76 changed files with 1179 additions and 1245 deletions

View File

@@ -46,7 +46,7 @@ class TestHooksOnLaunch(TestCase):
hookname = 'on-launch-good'
self.t.hooks.add_default(hookname, log=True)
code, out, err = self.t(("version",))
code, out, err = self.t("version")
self.assertIn("Taskwarrior", out)
hook = self.t.hooks[hookname]
@@ -62,7 +62,7 @@ class TestHooksOnLaunch(TestCase):
self.t.hooks.add_default(hookname, log=True)
# Failing hook should prevent processing.
code, out, err = self.t.runError(("version",))
code, out, err = self.t.runError("version")
self.assertNotIn("Taskwarrior", out)
hook = self.t.hooks[hookname]
@@ -78,7 +78,7 @@ class TestHooksOnLaunch(TestCase):
self.t.hooks.add_default(hookname, log=True)
# Failing hook should prevent processing.
code, out, err = self.t.runError(("version",))
code, out, err = self.t.runError("version")
self.assertNotIn("Could not get Hook exit status!", err)
hook = self.t.hooks[hookname]
@@ -94,7 +94,7 @@ class TestHooksOnLaunch(TestCase):
self.t.hooks.add_default(hookname, log=True)
# Failing hook should prevent processing.
code, out, err = self.t.runError(("version",))
code, out, err = self.t.runError("version")
self.assertIn("Hook Error: Expected 0 JSON task(s), found 1", err)
hook = self.t.hooks[hookname]