File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ def parse_version(version_string: str):
44
44
# we could switch to a re split but it seems to leave blanks so this is less hassle
45
45
versionString = versionString .replace ("-" , "." )
46
46
versionString = versionString .replace ("_" , "." )
47
+ versionString = versionString .replace ("+" , "." )
47
48
# Note: there may be other non-alphanumeric characters we want to add here in the
48
49
# future, but we'd like to look at those cases before adding them in case the version
49
50
# logic is very different.
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ def test_lt(self):
30
30
assert Version ("rc5" ) < Version ("rc10" )
31
31
assert Version ("9.10" ) < Version ("9.10.post" )
32
32
assert Version ("5.3.9" ) < Version ("5.4" )
33
+ assert Version ("2.0.0" ) < Version ("2.0.0-1+deb9u1" )
33
34
34
35
def test_gt (self ):
35
36
"""Make sure > works between versions, including some with unusual version schemes"""
@@ -42,6 +43,7 @@ def test_gt(self):
42
43
assert Version ("10.2.3.rc10" ) > Version ("10.2.3.rc2" )
43
44
assert Version ("9.10.post" ) > Version ("9.10" )
44
45
assert Version ("5.5" ) > Version ("5.4.1" )
46
+ assert Version ("2.0.0-1+deb9u1" ) > Version ("2.0.0" )
45
47
46
48
def test_error (self ):
47
49
"""Make sure 'unknown' and blank strings raise appropriate errors"""
You can’t perform that action at this time.
0 commit comments