diff options
author | Julien Cristau <julien.cristau@logilab.fr> | 2014-09-22 18:51:38 +0200 |
---|---|---|
committer | Julien Cristau <julien.cristau@logilab.fr> | 2014-09-22 18:51:38 +0200 |
commit | 4bc268065496e5ecba63e4fd69eebbe7bf2c6f17 (patch) | |
tree | 64ebc6a30f8bb09560ee1baa6ade76c2182e5324 | |
parent | 911bd12eed4e5984f1a4aeaff63306d7300fe116 (diff) | |
download | logilab-common-4bc268065496e5ecba63e4fd69eebbe7bf2c6f17.tar.gz |
[testlib] stop using internal unittest _addSkip method
I introduced this in changeset e0434df41a2e "[testlib] handle skips in
setUp and tearDown". Turns out that API changed in python 3.4, so let's
stop using it.
-rw-r--r-- | testlib.py | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -531,7 +531,12 @@ class TestCase(unittest.TestCase): except (KeyboardInterrupt, SystemExit): raise except unittest.SkipTest as e: - self._addSkip(result, str(e)) + if hasattr(result, 'addSkip'): + result.addSkip(self, str(e)) + else: + warnings.warn("TestResult has no addSkip method, skips not reported", + RuntimeWarning, 2) + result.addSuccess(self) return False except: result.addError(self, self.__exc_info()) |