[Git][reproducible-builds/diffoscope][master] tests: support ffmpeg >= 7 that adds some extra context to the diff

Mattia Rizzolo (@mattia) gitlab at salsa.debian.org
Tue Jul 30 05:26:09 UTC 2024



Mattia Rizzolo pushed to branch master at Reproducible Builds / diffoscope


Commits:
cadfc73a by Mattia Rizzolo at 2024-07-30T14:25:27+09:00
tests: support ffmpeg >= 7 that adds some extra context to the diff

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

- - - - -


1 changed file:

- tests/comparators/test_ffprobe.py


Changes:

=====================================
tests/comparators/test_ffprobe.py
=====================================
@@ -21,7 +21,7 @@ import subprocess
 
 from diffoscope.comparators.ffprobe import FfprobeFile
 
-from ..utils.data import load_fixture, assert_diff
+from ..utils.data import load_fixture, get_data
 from ..utils.tools import skip_unless_tools_exist, skip_unless_tool_is_at_least
 from ..utils.nonexisting import assert_non_existing
 
@@ -54,7 +54,11 @@ def differences(mp3_1, mp3_2):
 @skip_unless_tools_exist("ffprobe")
 @skip_unless_tool_is_at_least("ffprobe", ffprobe_version, "4.4")
 def test_diff(differences):
-    assert_diff(differences[0], "mp3_expected_diff")
+    # >= 7 adds a "(mp3float)" annotation
+    computed_diff = differences[0].unified_diff.replace(
+        "mp3 (mp3float)", "mp3"
+    )
+    assert computed_diff == get_data("mp3_expected_diff")
 
 
 @skip_unless_tools_exist("ffprobe")



View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/cadfc73a124a7f981ddb07a9993606ec09f9ef18

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/cadfc73a124a7f981ddb07a9993606ec09f9ef18
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/20240730/69d4b6fd/attachment.htm>


More information about the rb-commits mailing list