[diffoscope] 01/02: tests/test_binary: don't capture unused output from subprocess.

Mattia Rizzolo mattia at debian.org
Thu May 10 16:27:33 CEST 2018


This is an automated email from the git hooks/post-receive script.

mattia pushed a commit to annotated tag 94_bpo9+1
in repository diffoscope.

commit a1842009fbd404ee651b189c085d566cdb03011d
Author: Mattia Rizzolo <mattia at debian.org>
Date:   Thu May 10 16:20:09 2018 +0200

    tests/test_binary: don't capture unused output from subprocess.
    
    Fixes test on stretch-backports where subprocess.check_call() doesn't
    know of the 'encoding' argument.
    
    Gbp-Dch: Short
    Signed-off-by: Mattia Rizzolo <mattia at debian.org>
---
 tests/comparators/test_binary.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tests/comparators/test_binary.py b/tests/comparators/test_binary.py
index 66db18c..1e76b46 100644
--- a/tests/comparators/test_binary.py
+++ b/tests/comparators/test_binary.py
@@ -145,9 +145,8 @@ def test_with_compare_details_and_failed_process():
 
     class MockFile(FilesystemFile):
         def compare_details(self, other, source=None):
-            subprocess.check_output(
+            subprocess.check_call(
                 ['sh', '-c', 'echo "%s"; exit 42' % output],
-                encoding='utf-8',
             )
             raise Exception('should not be run')
     difference = MockFile(TEST_FILE1_PATH).compare(MockFile(TEST_FILE2_PATH))

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


More information about the diffoscope mailing list