We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1334da7 commit 1ad6dd8Copy full SHA for 1ad6dd8
1 file changed
tests/test_version.py
@@ -895,6 +895,14 @@ def test_base_version_ne_with_base_version(self) -> None:
895
v2 = SimpleVersion("2.0")
896
assert v1 != v2
897
898
+ def test_gt_with_cached_other(self) -> None:
899
+ """__gt__ fast path when other already has a cached key."""
900
+ other = Version("1.0")
901
+ # Pre-populate other's key cache via a comparison.
902
+ _ = other < Version("2.0")
903
+ # Now a fresh version calls __gt__ with a pre-cached other.
904
+ assert Version("2.0") > other
905
+
906
def test_version_compare_with_base_version_subclass(self) -> None:
907
"""Test Version comparison with another _BaseVersion subclass"""
908
v1 = Version("1.0")
0 commit comments