File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,16 @@ async def error() -> None:
4242 logger_error_spy .assert_called_once_with ("error function timed out" )
4343
4444
45+ async def test_catch_exceptions_timeout_no_message (caplog ):
46+ """'catch_exceptions' should not log any message if a 'TimeoutError' exception is raised and
47+ no timeout message is provided"""
48+ with catch_exceptions ():
49+ await asyncio .wait_for (asyncio .sleep (0.1 ), timeout = 0.01 )
50+
51+ assert_message_not_in_log (caplog , "Exception caught successfully, going on" )
52+ assert_message_not_in_log (caplog , "TimeoutError" )
53+
54+
4555async def test_catch_exceptions_base_exception (caplog ):
4656 """'catch_exceptions' should log the exception message if an exception inherited from
4757 'BaseSentinelaException' is raised"""
You can’t perform that action at this time.
0 commit comments