From ee30b937a7f4909a5913f80e2c62373e3c4ef817 Mon Sep 17 00:00:00 2001 From: SigureMo Date: Mon, 9 Oct 2023 22:05:53 +0800 Subject: [PATCH] add strict guard --- tests/test_error_handling.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/test_error_handling.py b/tests/test_error_handling.py index 860c29e9..f0a39827 100644 --- a/tests/test_error_handling.py +++ b/tests/test_error_handling.py @@ -1,5 +1,7 @@ import unittest +from test_case_base import TestCaseBase, strict_mode_guard + import sot @@ -10,11 +12,13 @@ def fn_with_try_except(): raise ValueError("ValueError") except ValueError: print("catch ValueError") + return True -class TestErrorHandling(unittest.TestCase): +class TestErrorHandling(TestCaseBase): + @strict_mode_guard(0) def test_fn_with_try_except(self): - sot.symbolic_translate(fn_with_try_except)() + self.assert_results(fn_with_try_except) if __name__ == "__main__":