Skip to content

Commit 48917f1

Browse files
authored
Merge pull request #12875 from hellozee/fix-unit-test
Fix invalid origin test to check all the logged messages
2 parents 203780b + dd85c28 commit 48917f1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

news/5dac0fc9-10c7-4d77-b8dc-8ff111c9557d.trivial.rst

Whitespace-only changes.

tests/unit/test_req.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,9 @@ def test_download_info_archive_cache_with_invalid_origin(
464464
assert len(reqset.all_requirements) == 1
465465
req = reqset.all_requirements[0]
466466
assert req.is_wheel_from_cache
467-
assert "Ignoring invalid cache entry origin file" in caplog.messages[0]
467+
assert any(
468+
"Ignoring invalid cache entry origin file" in x for x in caplog.messages
469+
)
468470

469471
def test_download_info_local_wheel(self, data: TestData) -> None:
470472
"""Test that download_info is set for requirements from a local wheel."""

0 commit comments

Comments
 (0)