Skip to content

Commit d0eb392

Browse files
committed
ensure logger set for all caplog.set_level
1 parent 477c858 commit d0eb392

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tests/unit/test_flow_mgr.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
from cylc.flow.flow_mgr import FlowMgr
2424
from cylc.flow.workflow_db_mgr import WorkflowDatabaseManager
25+
from cylc.flow import CYLC_LOG
2526

2627

2728
FAKE_NOW = datetime.datetime(2020, 12, 25, 17, 5, 55)
@@ -44,7 +45,7 @@ def test_all(
4445
):
4546
db_mgr = WorkflowDatabaseManager()
4647
flow_mgr = FlowMgr(db_mgr)
47-
caplog.set_level(logging.INFO)
48+
caplog.set_level(logging.INFO, CYLC_LOG)
4849

4950
count = 1
5051
meta = "the quick brown fox"

tests/unit/test_id_cli.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from pathlib import Path
2020
import pytest
2121

22+
from cylc.flow import CYLC_LOG
2223
from cylc.flow.async_util import pipe
2324
from cylc.flow.exceptions import InputError, WorkflowFilesError
2425
from cylc.flow.id import detokenise, tokenise, Tokens
@@ -537,7 +538,7 @@ def test_validate_workflow_ids_basic(tmp_run_dir):
537538

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

0 commit comments

Comments
 (0)