Skip to content

Commit 38483e9

Browse files
test(version_schemes): replace match with strict string assertions (#1805)
1 parent 7d0367d commit 38483e9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/test_version_schemes.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,8 @@ class NotVersionProtocol:
6161
ep.load.return_value = NotVersionProtocol
6262
mocker.patch.object(metadata, "entry_points", return_value=(ep,))
6363

64-
with pytest.warns(match="VersionProtocol"):
64+
with pytest.warns() as warnings:
6565
get_version_scheme(config.settings, "any")
66+
assert "Version scheme any does not implement the VersionProtocol" in str(
67+
warnings[0].message
68+
)

0 commit comments

Comments
 (0)