tests: binary: fix test after 934dfffb

Signed-off-by: Mattia Rizzolo's avatarMattia Rizzolo <mattia@debian.org>
parent aca61db5
...@@ -145,7 +145,10 @@ def test_with_compare_details_and_failed_process(): ...@@ -145,7 +145,10 @@ def test_with_compare_details_and_failed_process():
class MockFile(FilesystemFile): class MockFile(FilesystemFile):
def compare_details(self, other, source=None): def compare_details(self, other, source=None):
subprocess.check_output(['sh', '-c', 'echo "%s"; exit 42' % output], shell=False) subprocess.check_output(
['sh', '-c', 'echo "%s"; exit 42' % output],
encoding='utf-8',
)
raise Exception('should not be run') raise Exception('should not be run')
difference = MockFile(TEST_FILE1_PATH).compare(MockFile(TEST_FILE2_PATH)) difference = MockFile(TEST_FILE1_PATH).compare(MockFile(TEST_FILE2_PATH))
expected_diff = get_data('../data/binary_expected_diff') expected_diff = get_data('../data/binary_expected_diff')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment