We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d6a817c commit f01a03cCopy full SHA for f01a03c
tests/test_git.py
@@ -3,7 +3,7 @@
3
4
import pytest
5
6
-from commitizen import git
+from commitizen import cmd, git
7
from tests.utils import FakeCommand, create_file_and_commit
8
9
@@ -104,3 +104,14 @@ def test_get_tag_names_has_correct_arrow_annotation():
104
arrow_annotation = inspect.getfullargspec(git.get_tag_names).annotations["return"]
105
106
assert arrow_annotation == List[Optional[str]]
107
+
108
109
+def test_get_latest_tag_name(tmp_commitizen_project):
110
+ with tmp_commitizen_project.as_cwd():
111
+ tag_name = git.get_latest_tag_name()
112
+ assert tag_name is None
113
114
+ create_file_and_commit("feat(test): test")
115
+ cmd.run("git tag 1.0")
116
117
+ assert tag_name == "1.0"
0 commit comments