Skip to content

Commit

Permalink
Limit test to newer Git versions
Browse files Browse the repository at this point in the history
  • Loading branch information
mtkennerly committed Feb 16, 2024
1 parent 33281c8 commit a46f11a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/integration/test_dunamai.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,9 @@ def test__version__from_git__exclude_decoration(tmp_path) -> None:
assert from_vcs() == Version("0.1.0", dirty=False, branch=b)


# Older versions of Git fail with code 128:
# "fatal: missing object 0000000000000000000000000000000000000000 for refs/tags/bad.txt"
@pytest.mark.skipif(lacks_git_version([2, 7]), reason="Requires Git 2.7+")
def test__version__from_git__broken_ref(tmp_path) -> None:
vcs = tmp_path / "dunamai-git-broken-ref"
vcs.mkdir()
Expand Down

0 comments on commit a46f11a

Please sign in to comment.