This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user