refactor(version): simplify version comparison logic (#10109)
This commit is contained in:
parent
66e9bd90eb
commit
8b9fed75f3
2 changed files with 8 additions and 49 deletions
|
|
@ -22,17 +22,3 @@ from controllers.console.version import _has_new_version
|
|||
)
|
||||
def test_has_new_version(latest_version, current_version, expected):
|
||||
assert _has_new_version(latest_version=latest_version, current_version=current_version) == expected
|
||||
|
||||
|
||||
def test_has_new_version_invalid_input():
|
||||
with pytest.raises(ValueError):
|
||||
_has_new_version(latest_version="1.0", current_version="1.0.0")
|
||||
|
||||
with pytest.raises(ValueError):
|
||||
_has_new_version(latest_version="1.0.0", current_version="1.0")
|
||||
|
||||
with pytest.raises(ValueError):
|
||||
_has_new_version(latest_version="invalid", current_version="1.0.0")
|
||||
|
||||
with pytest.raises(ValueError):
|
||||
_has_new_version(latest_version="1.0.0", current_version="invalid")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue