Skip to content

Commit

Permalink
Merge pull request #6340 from MetRonnie/logging
Browse files Browse the repository at this point in the history
Minor test follow-up
  • Loading branch information
wxtim authored Aug 29, 2024
2 parents 1c5db24 + cad65e4 commit d1d1cc4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/unit/test_loggingutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ def test_patch_log_level(caplog: pytest.LogCaptureFixture):
"""Test patch_log_level temporarily changes the log level."""
caplog.set_level(logging.DEBUG)
logger = logging.getLogger("forest")
assert logger.level == logging.NOTSET
logger.setLevel(logging.ERROR)
logger.info("nope")
assert not caplog.records
Expand All @@ -264,7 +263,10 @@ def test_patch_log_level(caplog: pytest.LogCaptureFixture):


def test_patch_log_level__reset(caplog: pytest.LogCaptureFixture):
"""Test patch_log_level resets the log level correctly after use."""
"""Test patch_log_level resets the log level correctly after
use, not affected by the parent logger level - see
https://github.com/cylc/cylc-flow/pull/6327
"""
caplog.set_level(logging.ERROR)
logger = logging.getLogger("woods")
assert logger.level == logging.NOTSET
Expand Down

0 comments on commit d1d1cc4

Please sign in to comment.