[Git][reproducible-builds/diffoscope][master] 2 commits: tests: do not list as a skipping reason tools that do exists

Mattia Rizzolo gitlab at salsa.debian.org
Tue Mar 23 19:01:14 UTC 2021



Mattia Rizzolo pushed to branch master at Reproducible Builds / diffoscope


Commits:
0732de0d by Mattia Rizzolo at 2021-03-23T19:54:02+01:00
tests: do not list as a skipping reason tools that do exists

Signed-off-by: Mattia Rizzolo <mattia at debian.org>

- - - - -
c621448a by Mattia Rizzolo at 2021-03-23T20:00:47+01:00
tests: drop 'compose' from the list of required tools for these tests, since it doesn't seem to be required

Signed-off-by: Mattia Rizzolo <mattia at debian.org>

- - - - -


5 changed files:

- tests/comparators/test_gif.py
- tests/comparators/test_ico_image.py
- tests/comparators/test_jpeg_image.py
- tests/comparators/test_png.py
- tests/utils/tools.py


Changes:

=====================================
tests/comparators/test_gif.py
=====================================
@@ -55,7 +55,7 @@ def test_compare_non_existing(monkeypatch, gif1):
     assert_non_existing(monkeypatch, gif1, has_null_source=False)
 
 
- at skip_unless_tools_exist("gifbuild", "compose", "convert", "identify")
+ at skip_unless_tools_exist("gifbuild", "convert", "identify")
 def test_has_visuals(monkeypatch, gif3, gif4):
     monkeypatch.setattr(Config(), "compute_visual_diffs", True)
     gif_diff = gif3.compare(gif4)
@@ -65,7 +65,7 @@ def test_has_visuals(monkeypatch, gif3, gif4):
     assert gif_diff.details[1].visuals[1].data_type == "image/gif;base64"
 
 
- at skip_unless_tools_exist("gifbuild", "compose", "convert", "identify")
+ at skip_unless_tools_exist("gifbuild", "convert", "identify")
 def test_no_visuals_different_size(monkeypatch, gif1, gif2):
     monkeypatch.setattr(Config(), "compute_visual_diffs", True)
     gif_diff = gif1.compare(gif2)


=====================================
tests/comparators/test_ico_image.py
=====================================
@@ -74,7 +74,7 @@ def test_diff_meta2(differences_meta):
     assert differences_meta[-1].unified_diff == expected_diff
 
 
- at skip_unless_tools_exist("img2txt", "compose", "convert", "identify")
+ at skip_unless_tools_exist("img2txt", "convert", "identify")
 def test_has_visuals(monkeypatch, image1, image2):
     monkeypatch.setattr(Config(), "compute_visual_diffs", True)
     ico_diff = image1.compare(image2)


=====================================
tests/comparators/test_jpeg_image.py
=====================================
@@ -82,7 +82,7 @@ def test_diff_meta(differences_meta):
     assert differences_meta[-1].unified_diff == expected_diff
 
 
- at skip_unless_tools_exist("img2txt", "compose", "convert", "identify")
+ at skip_unless_tools_exist("img2txt", "convert", "identify")
 def test_has_visuals(monkeypatch, image1, image2):
     monkeypatch.setattr(Config(), "compute_visual_diffs", True)
     jpg_diff = image1.compare(image2)


=====================================
tests/comparators/test_png.py
=====================================
@@ -56,7 +56,7 @@ def test_compare_non_existing(monkeypatch, png1):
     assert_non_existing(monkeypatch, png1, has_null_source=False)
 
 
- at skip_unless_tools_exist("sng", "compose", "convert", "identify")
+ at skip_unless_tools_exist("sng", "convert", "identify")
 def test_has_visuals(monkeypatch, png1, png2):
     monkeypatch.setattr(Config(), "compute_visual_diffs", True)
     png_diff = png1.compare(png2)


=====================================
tests/utils/tools.py
=====================================
@@ -209,6 +209,8 @@ def reason(*tools):
     xs = []
 
     for x in tools:
+        if not tools_missing(x):
+            continue
         provider = get_package_provider(x)
         if provider is None:
             xs.append(x)



View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/compare/5afc0d18d58af09aad6ee48db7777e60663b3a25...c621448adb566392cd152ecff2ebfcd003b733f2

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/compare/5afc0d18d58af09aad6ee48db7777e60663b3a25...c621448adb566392cd152ecff2ebfcd003b733f2
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/20210323/7a7588bf/attachment.htm>


More information about the rb-commits mailing list