Skip to content

Commit a5d943d

Browse files
validate the warning we trigger on tags with local suffixes
1 parent b676410 commit a5d943d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

testing/test_git.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ def test_version_from_git(wd):
6363

6464
wd.commit_testfile()
6565
wd("git tag version-0.2.post210+gbe48adfpost3+g0cc25f2")
66-
assert wd.version.startswith("0.2")
66+
with pytest.warns(
67+
UserWarning, match="tag '.*' will be stripped of its suffix '.*'"
68+
):
69+
assert wd.version.startswith("0.2")
6770

6871
wd.commit_testfile()
6972
wd("git tag 17.33.0-rc")

0 commit comments

Comments
 (0)