From 2056fd44c5e271ac7e540a8bdde338a616378f52 Mon Sep 17 00:00:00 2001 From: Paul Natsuo Kishimoto Date: Wed, 30 Aug 2023 17:00:47 +0200 Subject: [PATCH] Update test of silence_log() --- message_ix_models/tests/util/test_logging.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/message_ix_models/tests/util/test_logging.py b/message_ix_models/tests/util/test_logging.py index c9d7e1cfc8..f3be6907de 100644 --- a/message_ix_models/tests/util/test_logging.py +++ b/message_ix_models/tests/util/test_logging.py @@ -33,7 +33,11 @@ def test_silence_log(caplog): with silence_log(): log.warning(msg) - assert [] == caplog.messages + assert [ + "Set level=40 for logger(s): message_ix_models message_data", + "…restored.", + ] == caplog.messages + caplog.clear() # After the "with" block, logging is restored log.warning(msg)