mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-19 09:53:08 +02:00
Tests: bug.368.t > feature.recurrence.t as python
This commit is contained in:
parent
db04f1b583
commit
1e31df3c7a
2 changed files with 14 additions and 61 deletions
|
@ -34,12 +34,13 @@ sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
|||
from basetest import Task, TestCase
|
||||
|
||||
|
||||
class TestBug327(TestCase):
|
||||
class TestRecurrenceProblems(TestCase):
|
||||
def setUp(self):
|
||||
self.t = Task()
|
||||
|
||||
def test_recurring_due_removal(self):
|
||||
"""Removing due from a recurring task causes date wrapping"""
|
||||
# Originally bug.327.t
|
||||
|
||||
self.t(("add", "foo", "recur:yearly", "due:eoy"))
|
||||
self.t(("list",)) # Trigger garbage collection
|
||||
|
@ -52,6 +53,18 @@ class TestBug327(TestCase):
|
|||
self.assertIn("\n1 task", out)
|
||||
self.assertNotIn("1969", out)
|
||||
|
||||
def test_recurring_not_as_epoch(self):
|
||||
"""Ensure 'until' is rendered as date, not epoch"""
|
||||
# Originally bug.368.t
|
||||
|
||||
self.t.config("dateformat.info", "m/d/Y")
|
||||
|
||||
self.t(("add", "foo", "due:today", "recur:yearly", "until:eom"))
|
||||
code, out, err = self.t(("info", "1"))
|
||||
|
||||
self.assertNotRegexpMatches(out, "Until\s+\d{10}")
|
||||
self.assertRegexpMatches(out, "Until\s+\d+\/\d+\/\d{4}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
from simpletap import TAPTestRunner
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue