Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mrchi committed Mar 4, 2024
1 parent a87f67e commit 48747d2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/test_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@


import unittest
from openwrt_luci_rpc.utilities import is_legacy_version

from packaging import version

from openwrt_luci_rpc.utilities import is_legacy_version


class TestOpenwrtLuciRPC(unittest.TestCase):
"""Tests for `openwrt_luci_rpc` package."""
Expand All @@ -21,8 +23,8 @@ def tearDown(self):
def test_is_legacy_version(self):
"""Test comparing versions works as expected."""

assert is_legacy_version(version.parse("15.05")) is True
assert is_legacy_version(version.parse("15.05.1")) is True
assert is_legacy_version(version.parse("15.05")) is False
assert is_legacy_version(version.parse("15.05.1")) is False
assert is_legacy_version(version.parse("17.01")) is True
assert is_legacy_version(version.parse("17.01.6")) is True

Expand Down

0 comments on commit 48747d2

Please sign in to comment.