Skip to content
Snippets Groups Projects
Commit 56969119 authored by Chris Lamb's avatar Chris Lamb :eyes:
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
No related branches found
No related tags found
No related merge requests found
......@@ -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
......@@ -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', (
......
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