Tests: assertTry() function introduced.

This commit is contained in:
Andrey Zelenkov
2018-01-15 15:57:32 +03:00
parent 75af52fd65
commit b12f1ea42d
2 changed files with 30 additions and 19 deletions

View File

@@ -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()