From 01a3c8e3f6a74b972dcf4b3feee145b085312c16 Mon Sep 17 00:00:00 2001 From: Thomas Lauf Date: Tue, 11 Apr 2017 07:04:05 +0200 Subject: [PATCH] TI-62: Fix test for invalid command --- test/cli.t | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/cli.t b/test/cli.t index 1c0899c1..634ef536 100755 --- a/test/cli.t +++ b/test/cli.t @@ -51,6 +51,7 @@ from basetest import Timew, TestCase # self.assertNotRegexpMatches(text, pattern) # self.tap("") + class TestCLI(TestCase): def setUp(self): """Executed before each test in the class""" @@ -68,9 +69,10 @@ class TestCLI(TestCase): self.assertIn("Tracking FOO", out) def test_TimeWarrior_with_invalid_command(self): - """Call a non-existing TimeWarrior command""" - code, out, err = self.t("bogus") - self.assertIn("'bogus' is not a timew command. See 'timew help'.", out) + """Call a non-existing TimeWarrior command should be an error""" + code, out, err = self.t.runError("bogus") + self.assertIn("'bogus' is not a timew command. See 'timew help'.", err) + if __name__ == "__main__": from simpletap import TAPTestRunner