Skip to content

Commit

Permalink
fixes a test
Browse files Browse the repository at this point in the history
  • Loading branch information
vvb committed Apr 22, 2020
1 parent fb2e1fd commit 96fbd4f
Showing 1 changed file with 40 additions and 2 deletions.
42 changes: 40 additions & 2 deletions tests/common/test_imcversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ def test_nightly_version2():


def test_nightly_version3():
# 2.0(2cS6) will be considered as 2.0(2d) internally
version1 = ImcVersion("2.0(2cS6)")
version2 = ImcVersion("2.0(2c)")
assert_equal((version1 == version2), True)
assert_equal((version1 == version2), False)


def test_nightly_version4():
Expand All @@ -51,6 +52,41 @@ def test_nightly_version4():
assert_equal((version1 < version2), True)


def test_spin_version1():
# version interpreted as 4.0(2b)
version1 = ImcVersion("4.0(2aS3)")
version2 = ImcVersion("4.0(2b)")
assert_equal((version1 == version2), True)


def test_spin_version2():
# version interpreted as 4.0(234c)
version1 = ImcVersion("4.0(234bS3)")
version2 = ImcVersion("4.0(234c)")
assert_equal((version1 == version2), True)


def test_spin_version3():
# version interpreted as 4.0(2z)
version1 = ImcVersion("4.0(2S3)")
version2 = ImcVersion("4.0(2z)")
assert_equal((version1 == version2), True)


def test_spin_version4():
# version interpreted as 4.0(234z)
version1 = ImcVersion("4.0(234S3)")
version2 = ImcVersion("4.0(234z)")
assert_equal((version1 == version2), True)


def test_patch_version1():
# version interpreted as 4.0(235a)
version1 = ImcVersion("4.0(234.5)")
version2 = ImcVersion("4.0(235a)")
assert_equal((version1 == version2), True)


def test_gt_same_major_version():
version1 = VersionMeta.Version151f
version2 = VersionMeta.Version151x
Expand All @@ -64,9 +100,11 @@ def test_gt_different_major_version():


def test_patch_versions():
# when we don't see a patch version we use z
# so 2.0(12) will be considerde as 2.0(12z)
version1 = ImcVersion("2.0(12b)")
version2 = ImcVersion("2.0(12)")
assert_equal((version1 > version2), True)
assert_equal((version1 > version2), False)


def test_handle_version():
Expand Down

0 comments on commit 96fbd4f

Please sign in to comment.