コード例 #1
0
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
コード例 #2
0
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"
コード例 #3
0
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
コード例 #4
0
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
コード例 #5
0
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
コード例 #6
0
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"
コード例 #7
0
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"