summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorLuciano Bello <luciano@debian.org>2018-10-27 16:11:55 -0400
committerLuciano Bello <luciano.bello@ibm.com>2018-10-28 14:14:58 -0400
commitf79598b7acc17b8d6c05d7a9fec502f41b7e8be5 (patch)
tree6221cacbca3b3f6916f314c190000bf1ad15b188 /testing
parentb72e86857802b257cc72d420c706624daf5f97ec (diff)
downloadsetuptools-scm-f79598b7acc17b8d6c05d7a9fec502f41b7e8be5.tar.gz
Add option git_describe_command
The option git_describe_command is added to allow the user to manipulate how `git describe` is called. Fixes #303 Fixes #283
Diffstat (limited to 'testing')
-rw-r--r--testing/test_git.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/testing/test_git.py b/testing/test_git.py
index 11e2d7b..a889293 100644
--- a/testing/test_git.py
+++ b/testing/test_git.py
@@ -191,3 +191,18 @@ def test_git_feature_branch_increments_major(wd):
wd("git checkout -b feature/fun")
wd.commit_testfile()
assert wd.get_version(version_scheme="python-simplified-semver").startswith("1.1.0")
+
+
+@pytest.mark.issue("https://github.com/pypa/setuptools_scm/issues/303")
+def test_not_matching_tags(wd):
+ wd.commit_testfile()
+ wd("git tag apache-arrow-0.11.1")
+ wd.commit_testfile()
+ wd("git tag apache-arrow-js-0.9.9")
+ wd.commit_testfile()
+ assert wd.get_version(
+ tag_regex=r"^apache-arrow-([\.0-9]+)$",
+ git_describe_command="git describe --dirty --tags --long --exclude *js* ",
+ ).startswith(
+ "0.11.2"
+ )