From cf672689cd5549dc166ed82adb2f4962cd1cb947 Mon Sep 17 00:00:00 2001 From: Matteo Campinoti Date: Tue, 21 Nov 2023 12:38:24 +0100 Subject: [PATCH] tests:utils - update ExceptionManager tests --- tests/test_utils.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_utils.py b/tests/test_utils.py index a5083fc..7efd780 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -68,6 +68,11 @@ def test_helpers(): assert isinstance(raises.value, FileNotFoundError) assert isinstance(context.exception, FileNotFoundError) + with ExceptionManager(BaseException, FileNotFoundError, allow=[OSError]) as context: + raise FileNotFoundError + + assert isinstance(context.exception, FileNotFoundError) + with ExceptionManager() as context: pass