Skip to content

Commit

Permalink
Merge pull request #5920 from wxtim/fix.ensure_logger_set_for_all_cap…
Browse files Browse the repository at this point in the history
…log.set_level

Fix.ensure logger set for all caplog.set level
  • Loading branch information
oliver-sanders authored Jan 12, 2024
2 parents 477c858 + d0eb392 commit faf3c66
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tests/unit/test_flow_mgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

from cylc.flow.flow_mgr import FlowMgr
from cylc.flow.workflow_db_mgr import WorkflowDatabaseManager
from cylc.flow import CYLC_LOG


FAKE_NOW = datetime.datetime(2020, 12, 25, 17, 5, 55)
Expand All @@ -44,7 +45,7 @@ def test_all(
):
db_mgr = WorkflowDatabaseManager()
flow_mgr = FlowMgr(db_mgr)
caplog.set_level(logging.INFO)
caplog.set_level(logging.INFO, CYLC_LOG)

count = 1
meta = "the quick brown fox"
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/test_id_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from pathlib import Path
import pytest

from cylc.flow import CYLC_LOG
from cylc.flow.async_util import pipe
from cylc.flow.exceptions import InputError, WorkflowFilesError
from cylc.flow.id import detokenise, tokenise, Tokens
Expand Down Expand Up @@ -537,7 +538,7 @@ def test_validate_workflow_ids_basic(tmp_run_dir):

def test_validate_workflow_ids_warning(caplog):
"""It should warn when the run number is provided as a cycle point."""
caplog.set_level(logging.WARN)
caplog.set_level(logging.WARN, CYLC_LOG)
_validate_workflow_ids(Tokens('workflow/run1//cycle/task'), src_path='')
assert caplog.messages == []

Expand Down

0 comments on commit faf3c66

Please sign in to comment.