def test_find_increment_type_none(): messages = NONE_INCREMENT_CC commits = [GitCommit(rev="test", title=message) for message in messages] increment_type = bump.find_increment( commits, regex=semantic_version_pattern, increments_map=semantic_version_map ) assert increment_type is None
def test_find_increment_type_major_sve(): messages = MAJOR_INCREMENTS_SVE commits = [GitCommit(rev="test", title=message) for message in messages] increment_type = bump.find_increment( commits, regex=semantic_version_pattern, increments_map=semantic_version_map ) assert increment_type == "MAJOR"
def test_find_increment(messages, expected_type): commits = [GitCommit(rev="test", title=message) for message in messages] increment_type = bump.find_increment( commits, regex=ConventionalCommitsCz.bump_pattern, increments_map=ConventionalCommitsCz.bump_map, ) assert increment_type == expected_type
def test_find_increment_sve(messages, expected_type): commits = [GitCommit(rev="test", title=message) for message in messages] increment_type = bump.find_increment(commits, regex=semantic_version_pattern, increments_map=semantic_version_map) assert increment_type == expected_type
def test_find_increment(messages, expected_type): commits = [GitCommit(rev="test", title=message) for message in messages] increment_type = bump.find_increment(commits) assert increment_type == expected_type
def test_find_increment_type_major(): messages = MAJOR_INCREMENTS_CC commits = [GitCommit(rev="test", title=message) for message in messages] increment_type = bump.find_increment(commits) assert increment_type == "MAJOR"
def test_find_increment_type_patch(): messages = PATCH_INCREMENTS_CC commits = [GitCommit(rev="test", title=message) for message in messages] increment_type = bump.find_increment(commits) assert increment_type == "PATCH"