From ec788eed5c55d070e75ea14ae87f1925e81633b7 Mon Sep 17 00:00:00 2001 From: tligui_y Date: Mon, 28 Jul 2025 16:17:00 +0200 Subject: [PATCH] Update tests/test_utils_logign.py --- tests/test_utils_logign.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_utils_logign.py b/tests/test_utils_logign.py index 1cfd43adc..598be055a 100644 --- a/tests/test_utils_logign.py +++ b/tests/test_utils_logign.py @@ -35,7 +35,7 @@ def setup_logging(): ("ENLARGE", "enlarge to ignore", False), ("ENLARGE", "other enlarge", True), ]) -def test_ignore_log_msg_filter(capfd, level, msg, should_appear): +def test_ignore_log_msg_filter(capsys, level, msg, should_appear): # Clear previous captures capsys.readouterr() @@ -54,7 +54,7 @@ def test_ignore_log_msg_filter(capfd, level, msg, should_appear): else: assert msg not in captured, f"Message '{msg}' should be filtered" -def test_ignore_only_by_level(capfd): +def test_ignore_only_by_level(capsys): capsys.readouterr() with ignore_log_msg(log, lvl="WARNING", msg=None): @@ -65,7 +65,7 @@ def test_ignore_only_by_level(capfd): assert "should be ignored" not in captured assert "should appear" in captured -def test_ignore_only_by_msg(capfd): +def test_ignore_only_by_msg(capsys): capsys.readouterr() with ignore_log_msg(log, lvl=None, msg="skip this"): @@ -76,7 +76,7 @@ def test_ignore_only_by_msg(capfd): assert "skip this" not in captured assert "keep this" in captured -def test_filter_removed_after_context(capfd): +def test_filter_removed_after_context(capsys): capsys.readouterr() # Filter during context