Skip to content
Snippets Groups Projects
Commit 31a6a56a authored by Chris Lamb's avatar Chris Lamb :eyes:
Browse files

Fix tests for 7zip 24.05.

parent 850c1ffa
No related branches found
No related tags found
No related merge requests found
Pipeline #680007 failed
......@@ -16,8 +16,9 @@
# You should have received a copy of the GNU General Public License
# along with diffoscope. If not, see <https://www.gnu.org/licenses/>.
import shutil
import pytest
import shutil
import subprocess
from diffoscope.comparators.gzip import GzipFile
from diffoscope.comparators.sevenz import SevenZFile
......@@ -25,13 +26,21 @@ from diffoscope.comparators.binary import FilesystemFile
from diffoscope.comparators.utils.specialize import specialize
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
sevenza = load_fixture("test1.disk.gz")
sevenzb = load_fixture("test2.disk.gz")
def sevenz_version():
try:
out = subprocess.check_output(["7z"])
except subprocess.CalledProcessError as e:
out = e.output
return out.decode("UTF-8").split()[1].strip()
def test_identification(sevenza):
assert isinstance(sevenza, GzipFile)
......@@ -69,6 +78,7 @@ def test_content_source_without_extension(tmpdir, sevenza, sevenzb):
@skip_unless_tools_exist("7z")
@skip_unless_tool_is_at_least("7z", sevenz_version, "24.05")
def test_metadata_diff(differences):
assert_diff(differences[0].details[0], "text_sevenzmetadata_expected_diff")
......
@@ -5,13 +5,13 @@
Scanning the drive for archives:
@@ -6,13 +6,13 @@
1 file, 131072 bytes (128 KiB)
--
Type = GPT
Physical Size = 131072
Sector Size = 512
-ID = BEFEFA22-EED4-4977-8407-46CD48ABC5D9
+ID = A2E15781-E1B6-422C-BA65-9210D36BE3AA
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment