From 641c80b193d8db2fc8ce6a10b463ddc4c21bccf6 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 23 Aug 2026 15:09:00 -0500 Subject: [PATCH] Use the caplog fixture where the deleted helper was --- tests/unit_tests/test_platformio_library.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/unit_tests/test_platformio_library.py b/tests/unit_tests/test_platformio_library.py index 66c36f66b5..adfb30201a 100644 --- a/tests/unit_tests/test_platformio_library.py +++ b/tests/unit_tests/test_platformio_library.py @@ -153,7 +153,9 @@ def test_localsource_download_returns_empty_build_dir(setup_core: Path) -> None: assert plain != out -def test_urlsource_download_extracts_then_reuses_marker(setup_core, monkeypatch): +def test_urlsource_download_extracts_then_reuses_marker( + setup_core, monkeypatch, caplog +): monkeypatch.setattr(lib, "rmdir", lambda path, msg="": None) dl_calls: list[list[str]] = [] monkeypatch.setattr( @@ -179,10 +181,10 @@ def test_urlsource_download_extracts_then_reuses_marker(setup_core, monkeypatch) assert len(dl_calls) == 1 # A batch caller passes a tracker and owns the messaging; no per-file INFO - with caplog_at_info() as records: - src.download("mylib-batch", progress=lambda done: None) + caplog.set_level("INFO") + src.download("mylib-batch", progress=lambda done: None) assert len(dl_calls) == 2 - assert not [r for r in records if "Downloading" in r.message] + assert "Downloading" not in caplog.text def test_resolve_registry_version_raises_without_pkg_file(monkeypatch):