test_exception.py 294 字节
Newer Older
Y
Yu Yang 已提交
1 2 3 4 5 6 7 8 9 10 11 12
import paddle.v2.framework.core as core
import unittest


class TestException(unittest.TestCase):
    def test_exception(self):
        self.assertRaises(core.EnforceNotMet,
                          lambda: core.__unittest_throw_exception__())


if __name__ == "__main__":
    unittest.main()