[diffoscope] 01/02: tests.comparators.test_rpm: PEP8 file
Chris Lamb
chris at chris-lamb.co.uk
Sat Sep 9 20:58:09 CEST 2017
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository diffoscope.
commit d7a19d75e881a68eb475b27c5a2262e59f6c1cd6
Author: Chris Lamb <lamby at debian.org>
Date: Sat Sep 9 19:42:47 2017 +0100
tests.comparators.test_rpm: PEP8 file
Gbp-Dch: ignore
---
tests/comparators/test_rpm.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/tests/comparators/test_rpm.py b/tests/comparators/test_rpm.py
index 945d8c4..2aade85 100644
--- a/tests/comparators/test_rpm.py
+++ b/tests/comparators/test_rpm.py
@@ -27,7 +27,6 @@ from ..utils.data import load_fixture, data, get_data, normalize_zeros
from ..utils.tools import skip_unless_tools_exist, skip_unless_module_exists
from ..utils.nonexisting import assert_non_existing
-
try:
from diffoscope.comparators.rpm import RpmFile
except ImportError:
@@ -36,18 +35,22 @@ except ImportError:
rpm1 = load_fixture('test1.rpm')
rpm2 = load_fixture('test2.rpm')
+
def test_identification(rpm1):
assert isinstance(rpm1, RpmFile)
+
@skip_unless_module_exists('rpm')
def test_no_differences(rpm1):
difference = rpm1.compare(rpm1)
assert difference is None
+
@pytest.fixture
def differences(rpm1, rpm2):
return rpm1.compare(rpm2).details
+
@skip_unless_module_exists('rpm')
@skip_unless_tools_exist('rpm2cpio')
def test_header(differences):
@@ -55,6 +58,7 @@ def test_header(differences):
expected_diff = get_data('rpm_header_expected_diff')
assert differences[0].unified_diff == expected_diff
+
@skip_unless_module_exists('rpm')
@skip_unless_tools_exist('rpm2cpio')
def test_listing(differences):
@@ -63,6 +67,7 @@ def test_listing(differences):
expected_diff = get_data('rpm_listing_expected_diff')
assert differences[1].details[0].unified_diff == expected_diff
+
@skip_unless_module_exists('rpm')
@skip_unless_tools_exist('rpm2cpio')
def test_content(differences):
@@ -71,11 +76,13 @@ def test_content(differences):
expected_diff = get_data('text_ascii_expected_diff')
assert differences[1].details[1].unified_diff == expected_diff
+
@skip_unless_module_exists('rpm')
@skip_unless_tools_exist('rpm2cpio')
def test_compare_non_existing(monkeypatch, rpm1):
assert_non_existing(monkeypatch, rpm1)
+
@skip_unless_tools_exist('xxd')
def test_fallback_comparison(monkeypatch):
manager = ComparatorManager()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the diffoscope
mailing list