<commit_before>from gitflow import version
from gitflow.version import VersionConfig

config = VersionConfig()
config.qualifiers = ['alpha', 'beta']


def test_major_increment():
    assert version.version_bump_major(config, "0.0.0").value == "1.0.0-alpha.1"
    assert version.version_bump_major(config, "1.0.0-beta.4").value == "2.0.0-alpha.1"


def test_minor_increment():
    assert version.version_bump_minor(config, "0.0.0").value == "0.1.0-alpha.1"
    assert version.version_bump_minor(config, "1.0.0-beta.4").value == "1.1.0-alpha.1"


def test_patch_increment():
    assert version.version_bump_patch(config, "0.0.0").value == "0.0.1-alpha.1"
    assert version.version_bump_patch(config, "1.0.0-beta.4").value == "1.0.1-alpha.1"


def test_qualifier_increment():
    assert version.version_bump_qualifier(config, "1.0.0").value is None
    assert version.version_bump_qualifier(config, "1.0.0-alpha.4").value == "1.0.0-beta.1"


def test_pre_release_increment():
    assert version.version_bump_prerelease(config, "1.0.0").value is None
    assert version.version_bump_prerelease(config, "1.0.0-alpha.4").value == "1.0.0-alpha.5"


def test_increment_to_release():
    assert version.version_bump_to_release(config, "1.0.0-alpha.4").value == "1.0.0"<commit_msg>test boundary cases<commit_after>from gitflow import version
from gitflow.version import VersionConfig

config = VersionConfig()
config.qualifiers = ['alpha', 'beta']


def test_major_increment():
    assert version.version_bump_major(config, "0.0.0").value == "1.0.0-alpha.1"
    assert version.version_bump_major(config, "1.0.0-beta.4").value == "2.0.0-alpha.1"


def test_minor_increment():
    assert version.version_bump_minor(config, "0.0.0").value == "0.1.0-alpha.1"
    assert version.version_bump_minor(config, "1.0.0-beta.4").value == "1.1.0-alpha.1"


def test_patch_increment():
    assert version.version_bump_patch(config, "0.0.0").value == "0.0.1-alpha.1"
    assert version.version_bump_patch(config, "1.0.5").value == "1.0.6-alpha.1"
    assert version.version_bump_patch(config, "1.0.0-beta.4").value == "1.0.1-alpha.1"


def test_qualifier_increment():
    assert version.version_bump_qualifier(config, "1.0.0").value is None
    assert version.version_bump_qualifier(config, "1.0.0-alpha.4").value == "1.0.0-beta.1"
    assert version.version_bump_qualifier(config, "1.0.0-beta.4").value is None


def test_pre_release_increment():
    assert version.version_bump_prerelease(config, "1.0.0").value is None
    assert version.version_bump_prerelease(config, "1.0.0-alpha").value is None
    assert version.version_bump_prerelease(config, "1.0.0-alpha.0").value == "1.0.0-alpha.1"
    assert version.version_bump_prerelease(config, "1.0.0-alpha.4").value == "1.0.0-alpha.5"


def test_increment_to_release():
    assert version.version_bump_to_release(config, "1.0.0-alpha.4").value == "1.0.0"
    assert version.version_bump_to_release(config, "1.0.0").value is None
{'fraction_non_alphanumeric': 0.16773757186337504, 'fraction_numerical': 0.05850524179912073, 'mean_word_length': 4.467652495378928, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6233987', 'n_tokens_mistral': 1154, 'n_tokens_neox': 1129, 'n_words': 166}