1515# along with this program. If not, see <http://www.gnu.org/licenses/>.
1616
1717import logging
18+
1819import pytest
1920
20- from cylc .flow import CYLC_LOG
2121from cylc .flow .commands import (
2222 force_trigger_tasks ,
2323 reload_workflow ,
@@ -261,15 +261,14 @@ async def test_logging(
261261 # Invalid tasks:
262262 '2005/a' , '2000/doh' ,
263263 ]
264- async with start (schd ) as log :
265- log .set_level (logging .DEBUG , CYLC_LOG )
264+ async with start (schd ):
266265 await run_cmd (remove_tasks (schd , tasks_to_remove , []))
267266
268267 assert log_filter (
269268 logging .INFO , "Removed tasks: 2000/a (flows=1), 2000/b (flows=1)"
270269 )
271270
272- assert log_filter (logging .DEBUG , "Task(s) not removable: 2001/a, 2001/b" )
271+ assert log_filter (logging .WARNING , "Task(s) not removable: 2001/a, 2001/b" )
273272 assert log_filter (logging .WARNING , "Invalid cycle point for task: a, 2005" )
274273 assert log_filter (
275274 logging .WARNING , "No tasks match the IDs:\n * 2000/doh\n * 2005/a"
@@ -283,13 +282,12 @@ async def test_logging_flow_nums(
283282):
284283 """Test logging of task removals involving flow numbers."""
285284 schd : Scheduler = scheduler (example_workflow )
286- async with start (schd ) as log :
287- log .set_level (logging .DEBUG , CYLC_LOG )
285+ async with start (schd ):
288286 await run_cmd (force_trigger_tasks (schd , ['1/a1' ], ['1' , '2' ]))
289287 # Removing from flow that doesn't exist doesn't work:
290288 await run_cmd (remove_tasks (schd , ['1/a1' ], ['3' ]))
291289 assert log_filter (
292- logging .DEBUG , "Task(s) not removable: 1/a1 (flows=3)"
290+ logging .WARNING , "Task(s) not removable: 1/a1 (flows=3)"
293291 )
294292
295293 # But if a valid flow is included, it will be removed from that flow:
0 commit comments