Skip to content

Commit

Permalink
Add workaround for Git 2.21.0 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mtkennerly committed Oct 25, 2021
1 parent be765c6 commit 6e4e290
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/integration/test_dunamai.py
Expand Up @@ -56,7 +56,11 @@ def test__version__from_git__with_annotated_tags(tmp_path) -> None:

with chdir(vcs):
run("git init")
run("git branch -m master")
try:
# Compatibility for newer Git versions:
run("git branch -m master")
except Exception:
pass
assert from_vcs() == Version("0.0.0", distance=0, commit=None, dirty=True)

(vcs / "foo.txt").write_text("hi")
Expand Down

0 comments on commit 6e4e290

Please sign in to comment.