From: Tomas Babej Date: Sun, 22 Mar 2015 23:00:02 +0000 (+0100) Subject: tests: Test execute command with return_all flag X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/commitdiff_plain/12bd696c799915fce6e48ad40d3ba8175e0ff872 tests: Test execute command with return_all flag --- diff --git a/tasklib/tests.py b/tasklib/tests.py index 19950a6..29b88a0 100644 --- a/tasklib/tests.py +++ b/tasklib/tests.py @@ -676,6 +676,16 @@ class TaskTest(TasklibTest): self.tw.execute_command(['+test', 'mod', 'unified', 'description']) + def test_return_all_from_executed_command(self): + Task(self.tw, description="test task", tags=['test']).save() + out, err, rc = self.tw.execute_command(['count'], return_all=True) + self.assertEqual(rc, 0) + + def test_return_all_from_failed_executed_command(self): + Task(self.tw, description="test task", tags=['test']).save() + out, err, rc = self.tw.execute_command(['countinvalid'], return_all=True) + self.assertNotEqual(rc, 0) + class TaskFromHookTest(TasklibTest):