[Git][reproducible-builds/diffoscope][master] Update ffmpeg tests to work with ffmpeg 4.4. (Closes: reproducible-builds/diffoscope#258)
Chris Lamb (@lamby)
gitlab at salsa.debian.org
Mon May 24 09:31:04 UTC 2021
Chris Lamb pushed to branch master at Reproducible Builds / diffoscope
Commits:
ef6305d8 by Chris Lamb at 2021-05-24T10:30:44+01:00
Update ffmpeg tests to work with ffmpeg 4.4. (Closes: reproducible-builds/diffoscope#258)
- - - - -
2 changed files:
- tests/comparators/test_ffprobe.py
- tests/data/mp3_expected_diff
Changes:
=====================================
tests/comparators/test_ffprobe.py
=====================================
@@ -1,7 +1,7 @@
#
# diffoscope: in-depth comparison of files, archives, and directories
#
-# Copyright © 2019-2020 Chris Lamb <lamby at debian.org>
+# Copyright © 2019-2021 Chris Lamb <lamby at debian.org>
#
# diffoscope is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,17 +17,26 @@
# along with diffoscope. If not, see <https://www.gnu.org/licenses/>.
import pytest
+import subprocess
from diffoscope.comparators.ffprobe import FfprobeFile
from ..utils.data import load_fixture, assert_diff
-from ..utils.tools import skip_unless_tools_exist
+from ..utils.tools import skip_unless_tools_exist, skip_unless_tool_is_at_least
from ..utils.nonexisting import assert_non_existing
mp3_1 = load_fixture("test1.mp3")
mp3_2 = load_fixture("test2.mp3")
+def ffprobe_version():
+ return (
+ subprocess.check_output(["ffprobe", "-version"])
+ .decode("utf-8")
+ .split()[2]
+ )
+
+
def test_identification(mp3_1):
assert isinstance(mp3_1, FfprobeFile)
@@ -43,6 +52,7 @@ def differences(mp3_1, mp3_2):
@skip_unless_tools_exist("ffprobe")
+ at skip_unless_tool_is_at_least("ffprobe", ffprobe_version, "4.4")
def test_diff(differences):
assert_diff(differences[0], "mp3_expected_diff")
=====================================
tests/data/mp3_expected_diff
=====================================
@@ -14,4 +14,4 @@
+ album : Example track title 2
+ date : 2222
Duration: 00:00:00.22, start: 0.000000, bitrate: 17 kb/s
- Stream #0:0: Audio: mp3, 8000 Hz, mono, fltp, 8 kb/s
+ Stream #0:0: Audio: mp3, 8000 Hz, mono, fltp, 8 kb/s
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/ef6305d8782cd593f337809365c55efc9eeeeff8
--
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/ef6305d8782cd593f337809365c55efc9eeeeff8
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/20210524/e2eb531a/attachment.htm>
More information about the rb-commits
mailing list