Test: Improved tw-1630 tests
This commit is contained in:
@@ -39,12 +39,23 @@ class TestBug1630(TestCase):
|
|||||||
def setUp(self):
|
def setUp(self):
|
||||||
"""Executed before each test in the class"""
|
"""Executed before each test in the class"""
|
||||||
self.t = Task()
|
self.t = Task()
|
||||||
|
self.t("add zero")
|
||||||
|
self.t("add one due:7d")
|
||||||
|
self.t("add two due:10d")
|
||||||
|
|
||||||
def test_attribute_modifier_with_duration(self):
|
def test_attribute_modifier_with_duration(self):
|
||||||
"""Verify that 'due.before:10d' is correctly interpreted"""
|
"""Verify that 'due.before:10d' is correctly interpreted"""
|
||||||
self.t("add one due:7d")
|
code, out, err = self.t("due.before:10d list rc.verbose:nothing")
|
||||||
code, out, err = self.t("due.before:10d list")
|
self.assertNotIn("zero", out)
|
||||||
self.tap(out)
|
self.assertIn("one", out)
|
||||||
|
self.assertNotIn("two", out)
|
||||||
|
|
||||||
|
def test_attribute_no_modifier_with_duration(self):
|
||||||
|
"""Verify that 'due:7d' is correctly interpreted"""
|
||||||
|
code, out, err = self.t("due:7d list rc.verbose:nothing")
|
||||||
|
self.assertNotIn("zero", out)
|
||||||
|
self.assertIn("one", out)
|
||||||
|
self.assertNotIn("two", out)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
Reference in New Issue
Block a user