[diffoscope] 02/03: test_cpio: PEP8 file.
Chris Lamb
chris at chris-lamb.co.uk
Sat Sep 9 12:16:56 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 3217c158793e08b198c9c394f72bc54768c3e184
Author: Chris Lamb <lamby at debian.org>
Date: Fri Sep 8 16:21:08 2017 +0100
test_cpio: PEP8 file.
Dch-Gbp: ignore
---
tests/comparators/test_cpio.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tests/comparators/test_cpio.py b/tests/comparators/test_cpio.py
index 00d65a2..cfb86d5 100644
--- a/tests/comparators/test_cpio.py
+++ b/tests/comparators/test_cpio.py
@@ -25,27 +25,31 @@ from ..utils.data import load_fixture, get_data
from ..utils.tools import skip_unless_tools_exist
from ..utils.nonexisting import assert_non_existing
-
cpio1 = load_fixture('test1.cpio')
cpio2 = load_fixture('test2.cpio')
+
def test_identification(cpio1, cpio2):
assert isinstance(cpio1, CpioFile)
assert isinstance(cpio2, CpioFile)
+
def test_no_differences(cpio1):
difference = cpio1.compare(cpio1)
assert difference is None
+
@pytest.fixture
def differences(cpio1, cpio2):
return cpio1.compare(cpio2).details
+
@skip_unless_tools_exist('cpio')
def test_listing(differences):
expected_diff = get_data('cpio_listing_expected_diff')
assert differences[0].unified_diff == expected_diff
+
@skip_unless_tools_exist('cpio')
def test_symlink(differences):
assert differences[1].source1 == 'dir/link'
@@ -53,6 +57,7 @@ def test_symlink(differences):
expected_diff = get_data('symlink_expected_diff')
assert differences[1].unified_diff == expected_diff
+
@skip_unless_tools_exist('cpio')
def test_compressed_files(differences):
assert differences[2].source1 == 'dir/text'
@@ -60,6 +65,7 @@ def test_compressed_files(differences):
expected_diff = get_data('text_ascii_expected_diff')
assert differences[2].unified_diff == expected_diff
+
@skip_unless_tools_exist('cpio')
def test_compare_non_existing(monkeypatch, cpio1):
assert_non_existing(monkeypatch, cpio1)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the diffoscope
mailing list