|
|
|
@ -4,8 +4,13 @@ import unittest
|
|
|
|
|
|
|
|
|
|
|
|
class TestException(unittest.TestCase):
|
|
|
|
class TestException(unittest.TestCase):
|
|
|
|
def test_exception(self):
|
|
|
|
def test_exception(self):
|
|
|
|
self.assertRaises(core.EnforceNotMet,
|
|
|
|
ex = None
|
|
|
|
lambda: core.__unittest_throw_exception__())
|
|
|
|
try:
|
|
|
|
|
|
|
|
core.__unittest_throw_exception__()
|
|
|
|
|
|
|
|
except core.EnforceNotMet as ex:
|
|
|
|
|
|
|
|
self.assertIn("test exception", ex.message)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self.assertIsNotNone(ex)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
if __name__ == "__main__":
|
|
|
|
|