[diffoscope] 01/02: test_binwalk: Pass around the result of .compare(..) not its details attribute.

Chris Lamb chris at chris-lamb.co.uk
Tue Oct 3 18:09:57 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 59a2042f0cd294fb5e425eb585cca757073f8a6b
Author: Chris Lamb <lamby at debian.org>
Date:   Tue Oct 3 17:08:11 2017 +0100

    test_binwalk: Pass around the result of .compare(..) not its details attribute.
    
    Gbp-Dch: ignore
---
 tests/comparators/test_binwalk.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/tests/comparators/test_binwalk.py b/tests/comparators/test_binwalk.py
index 45766d9..a205ff2 100644
--- a/tests/comparators/test_binwalk.py
+++ b/tests/comparators/test_binwalk.py
@@ -42,13 +42,14 @@ def test_no_differences(binwalk1):
 
 
 @pytest.fixture
-def differences(binwalk1, binwalk2):
-    return binwalk1.compare(binwalk2).details
+def comparison(binwalk1, binwalk2):
+    return binwalk1.compare(binwalk2)
 
 
 @skip_unless_tools_exist('cpio')
 @skip_unless_module_exists('binwalk')
-def test_listing(differences):
+def test_listing(comparison):
+    differences = comparison.details
     assert differences[0].source1 == '0.cpio'
     assert differences[1].source2 == '600.cpio'
 
@@ -58,7 +59,8 @@ def test_listing(differences):
 
 @skip_unless_tools_exist('cpio')
 @skip_unless_module_exists('binwalk')
-def test_symlink(differences):
+def test_symlink(comparison):
+    differences = comparison.details
     assert differences[0].details[1].source1 == 'dir/link'
     assert differences[0].details[1].comment == 'symlink'
     expected_diff = get_data('symlink_expected_diff')

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git


More information about the diffoscope mailing list