From 8b873230173690e9140bcbd51109faccc4fba638 Mon Sep 17 00:00:00 2001 From: Blind4Basics <32236948+Blind4Basics@users.noreply.github.com> Date: Sun, 9 May 2021 20:23:37 +0200 Subject: [PATCH] Update test_framework.py --- codewars_test/test_framework.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/codewars_test/test_framework.py b/codewars_test/test_framework.py index 50b9f85..cbe0993 100644 --- a/codewars_test/test_framework.py +++ b/codewars_test/test_framework.py @@ -51,8 +51,8 @@ def expect_error(message, function, exception=Exception): function() except exception: passed = True - except Exception: - pass + except Exception as e: + message = "{}: {} should be {}".format(message or "Unexpected exception", repr(e), repr(exception)) expect(passed, message) @@ -62,7 +62,7 @@ def expect_no_error(message, function, exception=BaseException): except exception as e: fail("{}: {}".format(message or "Unexpected exception", repr(e))) return - except Exception: + except: pass pass_()