]> git.madduck.net Git - etc/taskwarrior.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

tests: Expand test suite with tests for recurring native filters
authorTomas Babej <tomasbabej@gmail.com>
Mon, 23 May 2016 13:35:33 +0000 (15:35 +0200)
committerTomas Babej <tomasbabej@gmail.com>
Mon, 23 May 2016 13:35:33 +0000 (15:35 +0200)
tasklib/tests.py

index 5a8f576acd0aa1e6e3bba8567c37d6a78ff35c9c..77f1980f918aec78a008f885e276d2892b02108b 100644 (file)
@@ -105,6 +105,15 @@ class TaskFilterTest(TasklibTest):
 
         self.assertEqual(len(self.tw.tasks.waiting()), 1)
 
 
         self.assertEqual(len(self.tw.tasks.waiting()), 1)
 
+    def test_recurring_empty(self):
+        Task(self.tw, description="test task").save()
+        self.assertEqual(len(self.tw.tasks.recurring()), 0)
+
+    def test_recurring_non_empty(self):
+        Task(self.tw, description="test task", recur="daily",
+             due=datetime.datetime.now()).save()
+        self.assertEqual(len(self.tw.tasks.recurring()), 1)
+
     def test_filtering_by_attribute(self):
         Task(self.tw, description="no priority task").save()
         Task(self.tw, priority="H", description="high priority task").save()
     def test_filtering_by_attribute(self):
         Task(self.tw, description="no priority task").save()
         Task(self.tw, priority="H", description="high priority task").save()