Skip to content

Commit

Permalink
Issue 75 version_compare problem replication
Browse files Browse the repository at this point in the history
Signed-off-by: Caroline Russell <caroline@appthreat.dev>
  • Loading branch information
cerrussell committed Nov 22, 2023
1 parent da6ac56 commit 0e65d3a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ def test_normalise():


def test_version_compare():
res = utils.version_compare("2.0.0", "2.0.0", "3.0.0", "2.0.0", "3.0.0")
assert not res
res = utils.version_compare("3.0.0", "2.0.0", "2.7.9.4")
assert not res
res = utils.version_compare("2.0.0", "2.0.0", "2.7.9.4")
Expand Down Expand Up @@ -127,11 +129,13 @@ def test_version_compare():
assert res
res = utils.version_compare("1.0.3", "1.4.1", "*", None, None)
assert not res
res = utils.version_compare("12.1.0.2.0", "*", "12.1.0.2", None, None)
assert res


def test_version_compare1():
res = utils.version_compare("12.1.0.2.0", "*", "12.1.0.2", None, None)
assert res
res = utils.version_compare("2.0.0", None, "3.0.0", "2.0.0", "3.0.0")
assert not res


def test_version_compare_go():
Expand Down

0 comments on commit 0e65d3a

Please sign in to comment.