From fa40cfeaa34e673d029472ba41374dc19885aa44 Mon Sep 17 00:00:00 2001 From: hobovsky Date: Fri, 28 Jul 2023 21:45:46 +0200 Subject: [PATCH] Prevent AssertException from crashing tests --- codewars_test/test_framework.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/codewars_test/test_framework.py b/codewars_test/test_framework.py index 7b6fc6a..b702235 100644 --- a/codewars_test/test_framework.py +++ b/codewars_test/test_framework.py @@ -112,6 +112,8 @@ def wrapper(func): func() except AssertionError as e: display('FAILED', str(e)) + except AssertException: + pass # assertions emit '' before throwing the AssertException except Exception: fail('Unexpected exception raised') tb_str = ''.join(format_exception(*exc_info()))