Skip to content

Commit

Permalink
fix: blacken again (I miss pre-commit)
Browse files Browse the repository at this point in the history
  • Loading branch information
terriko committed Oct 25, 2023
1 parent 3cd0063 commit 58da2aa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions cve_bin_tool/version_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class CannotParseVersionException(Exception):
Thrown if the version doesn't comply with our expectations
"""


def parse_version(version_string: str):
"""
Splits a version string into an array for comparison.
Expand Down
9 changes: 4 additions & 5 deletions test/test_version_compare.py
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")

0 comments on commit 58da2aa

Please sign in to comment.