From fef441a8ff7368e778db95b9cfcfad7771159faf Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Mon, 15 Oct 2018 09:37:26 -0700 Subject: [PATCH] More concessions for Python 3.5 compatibility. --- tests/end-to-end/test_borgmatic.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/end-to-end/test_borgmatic.py b/tests/end-to-end/test_borgmatic.py index 5524d6d..a0314aa 100644 --- a/tests/end-to-end/test_borgmatic.py +++ b/tests/end-to-end/test_borgmatic.py @@ -11,7 +11,9 @@ def generate_configuration(config_path, repository_path): Generate borgmatic configuration into a file at the config path, and update the defaults so as to work for testing (including injecting the given repository path). ''' - subprocess.check_call('generate-borgmatic-config --destination {}'.format(config_path).split(' ')) + subprocess.check_call( + 'generate-borgmatic-config --destination {}'.format(config_path).split(' ') + ) config = ( open(config_path) .read() @@ -42,9 +44,8 @@ def test_borgmatic_command(): # Run borgmatic to generate a backup archive, and then list it to make sure it exists. subprocess.check_call('borgmatic --config {}'.format(config_path).split(' ')) output = subprocess.check_output( - 'borgmatic --config {} --list --json'.format(config_path).split(' '), - encoding=sys.stdout.encoding, - ) + 'borgmatic --config {} --list --json'.format(config_path).split(' ') + ).decode(sys.stdout.encoding) parsed_output = json.loads(output) assert len(parsed_output) == 1 @@ -52,9 +53,8 @@ def test_borgmatic_command(): # Also exercise the info flag. output = subprocess.check_output( - 'borgmatic --config {} --info --json'.format(config_path).split(' '), - encoding=sys.stdout.encoding, - ) + 'borgmatic --config {} --info --json'.format(config_path).split(' ') + ).decode(sys.stdout.encoding) parsed_output = json.loads(output) assert len(parsed_output) == 1