Fix version and gradle test

This commit is contained in:
erik 2023-02-21 10:07:30 +01:00
parent 1dc5a1e9e8
commit ea45671bea

View file

@ -22,7 +22,7 @@ from version_repository import VersionRepository
from release_type import ReleaseType
def test_version():
version = Version([1, 2, 3])
version = Version([1, 2, 3], ReleaseType.SNAPSHOT)
version.increment(ReleaseType.SNAPSHOT)
assert version.get_version_string() == "1.2.3-SNAPSHOT"
@ -62,8 +62,9 @@ def test_gradle(tmp_path):
# test
version_repo = VersionRepository.get(f)
version = Version.create_release_version(ReleaseType.SNAPSHOT)
version_repo.write_file(version.get_version_string)
version_list = version_repo.version_list
version = Version.create_release_version(version_list, ReleaseType.SNAPSHOT)
version_repo.write_file(version.get_version_string())
# check
assert 'version = "12.4.678-SNAPSHOT"' in f.read_text()