[Git][reproducible-builds/diffoscope][master] 2 commits: Ensure that tests with >= -style version constraints actually print the tool...

Chris Lamb (@lamby) gitlab at salsa.debian.org
Tue Apr 16 08:33:46 UTC 2024



Chris Lamb pushed to branch master at Reproducible Builds / diffoscope


Commits:
e52eef5a by Chris Lamb at 2024-04-16T09:32:55+01:00
Ensure that tests with >= -style version constraints actually print the tool name. (Closes: reproducible-builds/diffoscope#370)

- - - - -
99afaf60 by Chris Lamb at 2024-04-16T09:33:11+01:00
Avoid parens-in-parens in test skipping messages.

- - - - -


1 changed file:

- tests/utils/tools.py


Changes:

=====================================
tests/utils/tools.py
=====================================
@@ -111,7 +111,7 @@ def skip_if_tool_version_is(tool, actual_ver, target_ver, vcls=Version):
         actual_ver = actual_ver()
     return skipif(
         vcls(str(actual_ver)) == vcls(str(target_ver)),
-        reason="requires {} != {} ({} detected)".format(
+        reason="requires {} != {}; {} detected".format(
             tool, target_ver, actual_ver
         ),
         tools=(tool,),
@@ -125,8 +125,8 @@ def skip_unless_tool_is_at_least(tool, actual_ver, min_ver, vcls=Version):
         actual_ver = actual_ver()
     return skipif(
         vcls(str(actual_ver)) < vcls(str(min_ver)),
-        reason="{} >= {} ({} detected)".format(
-            reason(tool), min_ver, actual_ver
+        reason="{} >= {}; {} detected".format(
+            reason(tool, force_include=True), min_ver, actual_ver
         ),
         tools=(tool,),
     )
@@ -139,8 +139,8 @@ def skip_unless_tool_is_at_most(tool, actual_ver, max_ver, vcls=Version):
         actual_ver = actual_ver()
     return skipif(
         vcls(str(actual_ver)) > vcls(str(max_ver)),
-        reason="{} <= {} ({} detected)".format(
-            reason(tool), max_ver, actual_ver
+        reason="{} <= {}; {} detected".format(
+            reason(tool, force_include=True), max_ver, actual_ver
         ),
         tools=(tool,),
     )
@@ -156,7 +156,7 @@ def skip_unless_tool_is_between(
     return skipif(
         (vcls(str(actual_ver)) < vcls(str(min_ver)))
         or (vcls(str(actual_ver)) > vcls(str(max_ver))),
-        reason="{} min {} >= {} ({} detected)".format(
+        reason="{} min {} >= {}; {} detected".format(
             reason(tool, force_include=True), min_ver, max_ver, actual_ver
         ),
         tools=(tool,),



View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/compare/9659938d5517b1244ab3b5f34a06ca548c452c80...99afaf600c4c8de8e3446a275197ea06a646a8a7

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/compare/9659938d5517b1244ab3b5f34a06ca548c452c80...99afaf600c4c8de8e3446a275197ea06a646a8a7
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/20240416/afa3e522/attachment.htm>


More information about the rb-commits mailing list