def test_version_mixed2(mixed_repo2): v = Vinnie(repo=mixed_repo2, prefix="v") assert v.version() == "v0.0.1"
def test_major(repo): v = Vinnie(repo=repo, prefix="v") assert v.version() == "v0.0.2" assert v.next_major() == "v1.0.0" assert v.version() == "v1.0.0"
def test_version_mixed(mixed_repo): v = Vinnie(repo=mixed_repo, prefix="v") assert v.version() == "v0.0.2"
def test_bump(non_semver_repo): v = Vinnie(repo=non_semver_repo, prefix="v") assert v.version() == "v2" assert v.next_bump() == "v3"
def test_patch(repo): v = Vinnie(repo=repo, prefix="v") assert v.version() == "v0.0.2" assert v.next_patch() == "v0.0.3" assert v.version() == "v0.0.3"
def test_next_minor(repo): v = Vinnie(repo=repo, prefix="v") assert v.version() == "v0.0.2" assert v.get_next_minor() == "v0.1.0"
def test_repo_without_tags_no_semver(empty_repo): """ This tests situations where there are no initial tags """ v = Vinnie(repo=empty_repo, semver=False) v.dump() assert v.version() == "0" assert v.get_next_bump() == "1"
def test_repo_without_tags(empty_repo): """ This tests situations where there are no initial tags """ v = Vinnie(repo=empty_repo) v.dump() assert v.version() == "0.0.0" assert v.get_next_patch() == "0.0.1"
def test_current_version(repo): # When given a version, use that instead of whatever is found in the repo v = Vinnie(repo=repo, current_version="2.1.1") assert v.version() == "2.1.1" assert v.get_next_patch() == "2.1.2"
def test_version(repo): v = Vinnie(repo=repo, prefix="v") assert v.version() == "v0.0.2"