From a3748d4e58e42b0cf796cddeb904365b37340e51 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Fri, 20 Feb 2015 19:46:23 +0100 Subject: [PATCH 1/1] tests: Implement workaround around python2.6 missing SkipTest --- tasklib/tests.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tasklib/tests.py b/tasklib/tests.py index 15d36cc..c982a39 100644 --- a/tasklib/tests.py +++ b/tasklib/tests.py @@ -191,7 +191,12 @@ class TaskFilterTest(TasklibTest): # Older TW version does not support bumping modified # on save if self.tw.version < six.text_type('2.2.0'): - raise unittest.SkipTest() + # 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") t.save() -- 2.39.5