Commit 56969119 authored by Chris Lamb's avatar Chris Lamb 👀
Browse files

Device and RPM fallback comparisons needs xxd due to fixtures. (Closes: #854593)



Signed-off-by: Chris Lamb's avatarChris Lamb <lamby@debian.org>
parent 9d4113be
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -24,6 +24,8 @@ from diffoscope.comparators.device import Device
from diffoscope.comparators.utils.specialize import specialize

from utils.data import load_fixture, get_data
from utils.tools import skip_unless_tools_exist


text_ascii1 = load_fixture('text_ascii1')

@@ -42,10 +44,12 @@ def differences_reverse(text_ascii1, devnull):
def test_identification(devnull):
    assert isinstance(devnull, Device)

@skip_unless_tools_exist('xxd')
def test_diff(differences):
    expected_diff = get_data('device_expected_diff')
    assert differences.unified_diff == expected_diff

@skip_unless_tools_exist('xxd')
def test_diff_reverse(differences_reverse):
    expected_diff = get_data('device_expected_diff_reverse')
    assert differences_reverse.unified_diff == expected_diff
+1 −0
Original line number Diff line number Diff line
@@ -76,6 +76,7 @@ def test_content(differences):
def test_compare_non_existing(monkeypatch, rpm1):
    assert_non_existing(monkeypatch, rpm1)

@skip_unless_tools_exist('xxd')
def test_fallback_comparison(monkeypatch):
    manager = ComparatorManager()
    monkeypatch.setattr(manager, 'COMPARATORS', (