summaryrefslogtreecommitdiffhomepage
path: root/test/unit.py
diff options
context:
space:
mode:
authorAndrey Zelenkov <zelenkov@nginx.com>2018-01-15 15:57:32 +0300
committerAndrey Zelenkov <zelenkov@nginx.com>2018-01-15 15:57:32 +0300
commitb12f1ea42df315defba4c04c6281c1479fe37765 (patch)
tree7aad60f50f9c0212727cd4f705ee21f428e6b5b4 /test/unit.py
parent75af52fd65a7a55bf340727a3d47ae3b337c3b56 (diff)
downloadunit-b12f1ea42df315defba4c04c6281c1479fe37765.tar.gz
unit-b12f1ea42df315defba4c04c6281c1479fe37765.tar.bz2
Tests: assertTry() function introduced.
Diffstat (limited to 'test/unit.py')
-rw-r--r--test/unit.py4
1 files changed, 4 insertions, 0 deletions
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()