X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/blobdiff_plain/a0e990cd0832f5ae3343ce7f2aa3e125ac6900ae..f7c148ec05f006b3385e26017940604ffe9cb7ce:/tasklib/tests.py?ds=inline diff --git a/tasklib/tests.py b/tasklib/tests.py index f1247af..b740c0d 100644 --- a/tasklib/tests.py +++ b/tasklib/tests.py @@ -851,6 +851,14 @@ class DatetimeStringTest(TasklibTest): self.assertEqual(due_date, t['due']) def test_filtering_with_string_datetime(self): + if self.tw.version < six.text_type('2.4.0'): + # Python2.6 does not support SkipTest. As a workaround + # mark the test as passed by exiting. + if getattr(unittest, 'SkipTest', None) is not None: + raise unittest.SkipTest() + else: + return + t = Task(self.tw, description="test task", due=datetime.datetime.now() - datetime.timedelta(0,2)) t.save()