Skip to content

Commit 38c0758

Browse files
authored
Merge pull request #1164 from shifa-khan/1092
test(bootstrapper): fix caplog assertion that depends on global pytes…
2 parents 46871e4 + bde803f commit 38c0758

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

tests/test_bootstrapper.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import json
2+
import logging
23
import pathlib
34
import typing
45
from unittest.mock import Mock, patch
@@ -427,9 +428,12 @@ def test_cache_lookup_resolver_exception_logs_info(
427428
"""ResolverException (wheel not found) returns (None, None) and logs info."""
428429
bt = _make_cache_bootstrapper(tmp_context)
429430

430-
with patch(
431-
"fromager.resolver.find_all_matching_from_provider",
432-
side_effect=ResolverException("no matching version"),
431+
with (
432+
caplog.at_level(logging.INFO, logger="fromager.bootstrapper"),
433+
patch(
434+
"fromager.resolver.find_all_matching_from_provider",
435+
side_effect=ResolverException("no matching version"),
436+
),
433437
):
434438
result = bt._download_wheel_from_cache(
435439
req=Requirement("test-package"),

0 commit comments

Comments
 (0)