X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/blobdiff_plain/90d018e0f0c05ecbaed4699bc743b846abeafced..f7c148ec05f006b3385e26017940604ffe9cb7ce:/tasklib/tests.py?ds=sidebyside diff --git a/tasklib/tests.py b/tasklib/tests.py index 71ee90b..b740c0d 100644 --- a/tasklib/tests.py +++ b/tasklib/tests.py @@ -842,15 +842,23 @@ class DatetimeStringTest(TasklibTest): now = local_zone.localize(datetime.datetime.now()) due_date = local_zone.localize(datetime.datetime( year=now.year, - month=9, - day=3, - hour=0, + month=12, + day=31, + hour=23, minute=59, second=59 - )) + )) - datetime.timedelta(0,4 * 30 * 86400) 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()