Fix test method and attribute calls
This commit is contained in:
parent
1743dce46d
commit
d539c73318
1 changed files with 11 additions and 11 deletions
|
@ -24,30 +24,30 @@ from release_type import ReleaseType
|
||||||
def test_version():
|
def test_version():
|
||||||
version = Version([1, 2, 3], False)
|
version = Version([1, 2, 3], False)
|
||||||
|
|
||||||
version.increment(ReleaseLevel.SNAPSHOT)
|
version.increment(ReleaseType.SNAPSHOT)
|
||||||
assert version.get_version_string() == "1.2.3-SNAPSHOT"
|
assert version.get_version_string() == "1.2.3-SNAPSHOT"
|
||||||
assert version.version == [1, 2, 3]
|
assert version.version_list == [1, 2, 3]
|
||||||
assert version.is_snapshot
|
assert version.is_snapshot
|
||||||
|
|
||||||
version.increment(ReleaseLevel.BUMP)
|
version.increment(ReleaseType.BUMP)
|
||||||
assert version.get_version_string() == "1.2.4-SNAPSHOT"
|
assert version.get_version_string() == "1.2.4-SNAPSHOT"
|
||||||
assert version.version == [1, 2, 4]
|
assert version.version_list == [1, 2, 4]
|
||||||
assert not version.is_snapshot
|
assert not version.is_snapshot
|
||||||
|
|
||||||
version.increment(ReleaseLevel.PATCH)
|
version.increment(ReleaseType.PATCH)
|
||||||
assert version.get_version_string() == "1.2.5"
|
assert version.get_version_string() == "1.2.5"
|
||||||
assert version.version == [1, 2, 4]
|
assert version.version_list == [1, 2, 5]
|
||||||
assert not version.is_snapshot
|
assert not version.is_snapshot
|
||||||
|
|
||||||
version.increment(ReleaseLevel.SNAPSHOT)
|
version.increment(ReleaseType.SNAPSHOT)
|
||||||
assert version.get_version_string() == "1.2.5-SNAPSHOT"
|
assert version.get_version_string() == "1.2.5-SNAPSHOT"
|
||||||
version.increment(ReleaseLevel.SNAPSHOT)
|
version.increment(ReleaseType.SNAPSHOT)
|
||||||
assert version.get_version_string() == "1.2.5-SNAPSHOT"
|
assert version.get_version_string() == "1.2.5-SNAPSHOT"
|
||||||
|
|
||||||
version.increment(ReleaseLevel.MINOR)
|
version.increment(ReleaseType.MINOR)
|
||||||
assert version.get_version_string() == "1.3.0"
|
assert version.get_version_string() == "1.3.0"
|
||||||
|
|
||||||
version.increment(ReleaseLevel.MAJOR)
|
version.increment(ReleaseType.MAJOR)
|
||||||
assert version.get_version_string() == "2.0.0"
|
assert version.get_version_string() == "2.0.0"
|
||||||
|
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ def test_gradle(tmp_path):
|
||||||
|
|
||||||
# test
|
# test
|
||||||
version_repo = VersionRepository.get(f)
|
version_repo = VersionRepository.get(f)
|
||||||
version = Version.create_release_version(ReleaseLevel.SNAPSHOT)
|
version = Version.create_release_version(ReleaseType.SNAPSHOT)
|
||||||
version_repo.write_file(version.get_version_string)
|
version_repo.write_file(version.get_version_string)
|
||||||
|
|
||||||
# check
|
# check
|
||||||
|
|
Loading…
Reference in a new issue