forked from intel/cve-bin-tool
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: blacken again (I miss pre-commit)
- Loading branch information
Showing
2 changed files
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,23 @@ | ||
# Copyright (C) 2023 Intel Corporation | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
import pytest | ||
|
||
from cve_bin_tool.version_compare import Version | ||
|
||
|
||
class TestVersionCompare: | ||
def test_eq(self): | ||
""" Make sure == works between versions """ | ||
"""Make sure == works between versions""" | ||
assert Version("1.2") == Version("1.2") | ||
|
||
def test_lt(self): | ||
""" Make sure < works between versions, including some with unusual version schemes """ | ||
"""Make sure < works between versions, including some with unusual version schemes""" | ||
assert Version("1.2") < Version("1.3") | ||
assert Version("1.2a") < Version("1.3") | ||
assert Version("1_2a") < Version("5a") | ||
|
||
def test_gt(self): | ||
""" Make sure > works between versions, including some with unusual version schemes """ | ||
"""Make sure > works between versions, including some with unusual version schemes""" | ||
assert Version("1.1.1a") > Version("1.0.1z") | ||
assert Version("2-kdc") > Version("2-a") | ||
assert Version("7.34.0") > Version("7.3.0") | ||
|