[Git][reproducible-builds/diffoscope][master] 2 commits: Address long-hidden issue in the test_versions testsuite where we weren't...
Chris Lamb (@lamby)
gitlab at salsa.debian.org
Fri Apr 11 19:16:15 UTC 2025
Chris Lamb pushed to branch master at Reproducible Builds / diffoscope
Commits:
d930e990 by Chris Lamb at 2025-04-11T10:03:51-07:00
Address long-hidden issue in the test_versions testsuite where we weren't testing ">" as it was masked by the tests for equality.
- - - - -
8234ff0a by Chris Lamb at 2025-04-11T10:05:02-07:00
Correct longstanding issue where many ">"-based version tests used in conditional fixtures were broken. Thanks, Colin Watson. (Closes: Debian:#1102658)
- - - - -
2 changed files:
- tests/test_versions.py
- tests/utils/versions.py
Changes:
=====================================
tests/test_versions.py
=====================================
@@ -151,6 +151,9 @@ cases = [
("0^", "0", +1),
("0^", "0^", 0),
("0^", "0^~", 1),
+ # OpenSSH (#1102658)
+ ("10.0p1", "9.7p1", 1),
+ ("9.7p1", "10.0p1", -1),
]
@@ -172,6 +175,6 @@ def test_version_gt(a, b):
@pytest.mark.parametrize("a,b", [c[:2] for c in cases if c[2] == 0])
-def test_version_gt(a, b):
+def test_version_eq(a, b):
assert Version(a) == b
assert Version(a) == Version(b)
=====================================
tests/utils/versions.py
=====================================
@@ -101,3 +101,6 @@ class Version(str):
def __lt__(self, other):
return self._cmp(other) < 0
+
+ def __gt__(self, other):
+ return self._cmp(other) > 0
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/compare/0c3ec6aadaaa26b71b8fc29f2f998e5b0bb9e359...8234ff0a72b7e4ebc6a857ccfa24f76941c9d281
--
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/compare/0c3ec6aadaaa26b71b8fc29f2f998e5b0bb9e359...8234ff0a72b7e4ebc6a857ccfa24f76941c9d281
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20250411/57a88f4e/attachment.htm>
More information about the rb-commits
mailing list