From b12f1ea42df315defba4c04c6281c1479fe37765 Mon Sep 17 00:00:00 2001 From: Andrey Zelenkov Date: Mon, 15 Jan 2018 15:57:32 +0300 Subject: Tests: assertTry() function introduced. --- test/unit.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/unit.py') diff --git a/test/unit.py b/test/unit.py index 1bd927f3..b510b42c 100644 --- a/test/unit.py +++ b/test/unit.py @@ -27,6 +27,10 @@ class TestUnit(unittest.TestCase): if '--leave' not in sys.argv: shutil.rmtree(self.testdir) + def assertTry(self, assert_method, description, *args): + try: getattr(self, assert_method)(*args, description) + except AssertionError: print('not yet: ' + description) + def check_modules(self, *modules): self._run() -- cgit