Skip to content

Commit

Permalink
Update test of silence_log()
Browse files Browse the repository at this point in the history
  • Loading branch information
khaeru committed Aug 30, 2023
1 parent 963e51f commit 2056fd4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion message_ix_models/tests/util/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2056fd4

Please sign in to comment.