X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/blobdiff_plain/3183652e5dd661da1569c758f6a3f2fb7fe9fd27..5ca9944bd0c33603dfc37d2e5f044cf03f77a2ea:/tasklib/tests.py diff --git a/tasklib/tests.py b/tasklib/tests.py index a78f25c..990bc3b 100644 --- a/tasklib/tests.py +++ b/tasklib/tests.py @@ -676,6 +676,17 @@ 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, allow_failure=False) + self.assertNotEqual(rc, 0) + class TaskFromHookTest(TasklibTest): @@ -939,12 +950,12 @@ class AnnotationTest(TasklibTest): class UnicodeTest(TasklibTest): def test_unicode_task(self): - Task(self.tw, description="†åßk").save() + Task(self.tw, description=six.u("†åßk")).save() self.tw.tasks.get() def test_filter_by_unicode_task(self): - Task(self.tw, description="†åßk").save() - tasks = self.tw.tasks.filter(description="†åßk") + Task(self.tw, description=six.u("†åßk")).save() + tasks = self.tw.tasks.filter(description=six.u("†åßk")) self.assertEqual(len(tasks), 1) def test_non_unicode_task(self):