Update tests/test_utils_logign.py
Run CI Tests / test (push) Successful in 32s

This commit is contained in:
2025-07-28 16:17:00 +02:00
parent 910b287264
commit ec788eed5c
+4 -4
View File
@@ -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