Skip to content

Commit

Permalink
tests: add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
terriko committed Dec 12, 2023
1 parent 79cb075 commit a14a60b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/test_version_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ def test_lt(self):
assert Version("9.10") < Version("9.10.post")
assert Version("5.3.9") < Version("5.4")
assert Version("2.0.0") < Version("2.0.0-1+deb9u1")
assert Version("1.1.0l.1~deb9u2") < Version("2.0.0-1+deb9u1")
assert Version("1.1.0l.1~deb9u2") < Version("1.1.0m")

def test_gt(self):
"""Make sure > works between versions, including some with unusual version schemes"""
Expand All @@ -44,6 +46,7 @@ def test_gt(self):
assert Version("9.10.post") > Version("9.10")
assert Version("5.5") > Version("5.4.1")
assert Version("2.0.0-1+deb9u1") > Version("2.0.0")
assert Version("1.1.0m") > Version("1.1.0l.1~deb9u2")

def test_error(self):
"""Make sure 'unknown' and blank strings raise appropriate errors"""
Expand Down

0 comments on commit a14a60b

Please sign in to comment.