mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Test: Merged bug.851.t into math.t
This commit is contained in:
parent
2c4a084cb0
commit
4e178c8186
2 changed files with 23 additions and 66 deletions
23
test/math.t
23
test/math.t
|
@ -84,6 +84,29 @@ class TestMath(TestCase):
|
|||
code, out, err = self.t('_get 6.due')
|
||||
self.assertEqual(out, self.when)
|
||||
|
||||
class TestBug851(TestCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
"""Executed once before any test in the class"""
|
||||
cls.t = Task()
|
||||
cls.t('add past due:-2days')
|
||||
cls.t('add future due:2days')
|
||||
|
||||
def setUp(self):
|
||||
"""Executed before each test in the class"""
|
||||
|
||||
def test_attribute_before_with_math(self):
|
||||
"""851: Test due.before:now+1d"""
|
||||
code, out, err = self.t('due.before:now+1day ls')
|
||||
self.assertIn("past", out)
|
||||
self.assertNotIn("future", out)
|
||||
|
||||
def test_attribute_after_with_math(self):
|
||||
"""851: Test due.after:now+1d"""
|
||||
code, out, err = self.t('due.after:now+1day ls')
|
||||
self.assertNotIn("past", out)
|
||||
self.assertIn("future", out)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
from simpletap import TAPTestRunner
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue